Фельдбейн Артур Станиславович %!s(int64=3) %!d(string=hai) anos
pai
achega
5e920c034e
Modificáronse 53 ficheiros con 775 adicións e 70 borrados
  1. BIN=BIN
      Kafe/.vs/Kafe/v17/.suo
  2. 3 1
      Kafe/Kafe/App.config
  3. 2 2
      Kafe/Kafe/Dishes.cs
  4. 35 10
      Kafe/Kafe/Kafe.csproj
  5. 1 1
      Kafe/Kafe/MainWindow.xaml.cs
  6. 1 0
      Kafe/Kafe/Model.Context.cs
  7. 57 15
      Kafe/Kafe/Model.edmx
  8. 7 5
      Kafe/Kafe/Model.edmx.diagram
  9. 2 2
      Kafe/Kafe/Order.cs
  10. 24 0
      Kafe/Kafe/OrderDishes.cs
  11. 13 0
      Kafe/Kafe/Partial.cs
  12. 6 2
      Kafe/Kafe/Windows/AdminWindow.xaml
  13. 19 0
      Kafe/Kafe/Windows/AdminWindow.xaml.cs
  14. 1 1
      Kafe/Kafe/Windows/CookerWindow.xaml
  15. 12 0
      Kafe/Kafe/Windows/DishesWindow.xaml
  16. 27 0
      Kafe/Kafe/Windows/DishesWindow.xaml.cs
  17. 12 0
      Kafe/Kafe/Windows/EmployeeWindow.xaml
  18. 27 0
      Kafe/Kafe/Windows/EmployeeWindow.xaml.cs
  19. 12 0
      Kafe/Kafe/Windows/OrderWindow.xaml
  20. 27 0
      Kafe/Kafe/Windows/OrderWindow.xaml.cs
  21. 1 1
      Kafe/Kafe/Windows/WaiterWindow.xaml
  22. BIN=BIN
      Kafe/Kafe/bin/Debug/Kafe.exe
  23. 3 1
      Kafe/Kafe/bin/Debug/Kafe.exe.config
  24. BIN=BIN
      Kafe/Kafe/bin/Debug/Kafe.pdb
  25. 1 1
      Kafe/Kafe/obj/Debug/Kafe.csproj.CoreCompileInputs.cache
  26. 2 0
      Kafe/Kafe/obj/Debug/Kafe.csproj.FileListAbsolute.txt
  27. BIN=BIN
      Kafe/Kafe/obj/Debug/Kafe.exe
  28. BIN=BIN
      Kafe/Kafe/obj/Debug/Kafe.g.resources
  29. BIN=BIN
      Kafe/Kafe/obj/Debug/Kafe.pdb
  30. 3 3
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.cache
  31. 3 3
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.i.cache
  32. 2 1
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.i.lref
  33. 1 0
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.lref
  34. BIN=BIN
      Kafe/Kafe/obj/Debug/TempPE/Model.Designer.cs.dll
  35. BIN=BIN
      Kafe/Kafe/obj/Debug/TempPE/Model.cs.dll
  36. BIN=BIN
      Kafe/Kafe/obj/Debug/Windows/AdminWindow.baml
  37. 55 1
      Kafe/Kafe/obj/Debug/Windows/AdminWindow.g.cs
  38. 55 1
      Kafe/Kafe/obj/Debug/Windows/AdminWindow.g.i.cs
  39. BIN=BIN
      Kafe/Kafe/obj/Debug/Windows/CookerWindow.baml
  40. 1 1
      Kafe/Kafe/obj/Debug/Windows/CookerWindow.g.cs
  41. 1 1
      Kafe/Kafe/obj/Debug/Windows/CookerWindow.g.i.cs
  42. 75 0
      Kafe/Kafe/obj/Debug/Windows/DishesWindow.g.i.cs
  43. 75 0
      Kafe/Kafe/obj/Debug/Windows/EmployeeWindow.g.i.cs
  44. BIN=BIN
      Kafe/Kafe/obj/Debug/Windows/OrderWindow.baml
  45. 75 0
      Kafe/Kafe/obj/Debug/Windows/OrderWindow.g.cs
  46. 75 0
      Kafe/Kafe/obj/Debug/Windows/OrderWindow.g.i.cs
  47. BIN=BIN
      Kafe/Kafe/obj/Debug/Windows/WaiterWindow.baml
  48. 1 1
      Kafe/Kafe/obj/Debug/Windows/WaiterWindow.g.cs
  49. 1 1
      Kafe/Kafe/obj/Debug/Windows/WaiterWindow.g.i.cs
  50. 47 7
      Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.csdl
  51. 9 8
      Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.msl
  52. 1 0
      Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.ssdl
  53. BIN=BIN
      db.sql

BIN=BIN
Kafe/.vs/Kafe/v17/.suo


+ 3 - 1
Kafe/Kafe/App.config

@@ -17,4 +17,6 @@
       <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
     </providers>
   </entityFramework>
-<connectionStrings><add name="KafeDBEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(localdb)\MSSQLLocalDB;initial catalog=KafeDB;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings></configuration>
+<connectionStrings>
+  
+  <add name="KafeDBEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(localdb)\MSSQLLocalDB;initial catalog=KafeDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings></configuration>

+ 2 - 2
Kafe/Kafe/Dishes.cs

@@ -17,7 +17,7 @@ namespace Kafe
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
         public Dishes()
         {
-            this.Order = new HashSet<Order>();
+            this.OrderDishes = new HashSet<OrderDishes>();
         }
     
         public int ID { get; set; }
@@ -26,6 +26,6 @@ namespace Kafe
         public int CookTime { get; set; }
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
-        public virtual ICollection<Order> Order { get; set; }
+        public virtual ICollection<OrderDishes> OrderDishes { get; set; }
     }
 }

+ 35 - 10
Kafe/Kafe/Kafe.csproj

@@ -74,14 +74,28 @@
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
     <Compile Include="Helper.cs" />
+    <Compile Include="Model.Context.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Model.Context.tt</DependentUpon>
+    </Compile>
     <Compile Include="Model.cs">
       <AutoGen>True</AutoGen>
       <DesignTime>True</DesignTime>
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
+    <Compile Include="Model.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Model.edmx</DependentUpon>
+    </Compile>
     <Compile Include="Order.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
+    <Compile Include="OrderDishes.cs">
+      <DependentUpon>Model.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Partial.cs" />
     <Compile Include="PayStatus.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
@@ -100,6 +114,15 @@
     <Compile Include="Windows\CookerWindow.xaml.cs">
       <DependentUpon>CookerWindow.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Windows\DishesWindow.xaml.cs">
+      <DependentUpon>DishesWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Windows\EmployeeWindow.xaml.cs">
+      <DependentUpon>EmployeeWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Windows\OrderWindow.xaml.cs">
+      <DependentUpon>OrderWindow.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Windows\WaiterWindow.xaml.cs">
       <DependentUpon>WaiterWindow.xaml</DependentUpon>
     </Compile>
@@ -123,22 +146,24 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Windows\DishesWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Windows\EmployeeWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Windows\OrderWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Windows\WaiterWindow.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Model.Context.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Model.Context.tt</DependentUpon>
-    </Compile>
-    <Compile Include="Model.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Model.edmx</DependentUpon>
-    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
     </Compile>

+ 1 - 1
Kafe/Kafe/MainWindow.xaml.cs

@@ -34,7 +34,7 @@ namespace Kafe
             var password = PasswordTB.Password.Trim();
             var abc = authorization(login,password);
 
-            MessageBox.Show($"{abc.Item1}, {abc.Item2}");
+            //MessageBox.Show($"{abc.Item1}, {abc.Item2}");
         }
 
 

+ 1 - 0
Kafe/Kafe/Model.Context.cs

@@ -29,6 +29,7 @@ namespace Kafe
         public virtual DbSet<Dishes> Dishes { get; set; }
         public virtual DbSet<Employee> Employee { get; set; }
         public virtual DbSet<Order> Order { get; set; }
+        public virtual DbSet<OrderDishes> OrderDishes { get; set; }
         public virtual DbSet<PayStatus> PayStatus { get; set; }
         public virtual DbSet<Position> Position { get; set; }
         public virtual DbSet<Shift> Shift { get; set; }

+ 57 - 15
Kafe/Kafe/Model.edmx

@@ -52,6 +52,7 @@
           </Key>
           <Property Name="OrderID" Type="int" Nullable="false" />
           <Property Name="DishID" Type="int" Nullable="false" />
+          <Property Name="Count" Type="int" Nullable="false" />
         </EntityType>
         <EntityType Name="PayStatus">
           <Key>
@@ -256,7 +257,7 @@
           <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
           <Property Name="Cost" Type="Double" Nullable="false" />
           <Property Name="CookTime" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="Order" Relationship="Self.OrderDishes" FromRole="Dishes" ToRole="Order" />
+          <NavigationProperty Name="OrderDishes" Relationship="Self.FK_OrderDishes_Dishes" FromRole="Dishes" ToRole="OrderDishes" />
         </EntityType>
         <EntityType Name="Employee">
           <Key>
@@ -288,7 +289,18 @@
           <NavigationProperty Name="CookStatus" Relationship="Self.FK_Order_CookStatus" FromRole="Order" ToRole="CookStatus" />
           <NavigationProperty Name="Employee" Relationship="Self.FK_Order_Employee" FromRole="Order" ToRole="Employee" />
           <NavigationProperty Name="PayStatus" Relationship="Self.FK_Order_PayStatus" FromRole="Order" ToRole="PayStatus" />
-          <NavigationProperty Name="Dishes" Relationship="Self.OrderDishes" FromRole="Order" ToRole="Dishes" />
+          <NavigationProperty Name="OrderDishes" Relationship="Self.FK_OrderDishes_Order" FromRole="Order" ToRole="OrderDishes" />
+        </EntityType>
+        <EntityType Name="OrderDishes">
+          <Key>
+            <PropertyRef Name="OrderID" />
+            <PropertyRef Name="DishID" />
+          </Key>
+          <Property Name="OrderID" Type="Int32" Nullable="false" />
+          <Property Name="DishID" Type="Int32" Nullable="false" />
+          <Property Name="Count" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="Dishes" Relationship="Self.FK_OrderDishes_Dishes" FromRole="OrderDishes" ToRole="Dishes" />
+          <NavigationProperty Name="Order" Relationship="Self.FK_OrderDishes_Order" FromRole="OrderDishes" ToRole="Order" />
         </EntityType>
         <EntityType Name="PayStatus">
           <Key>
@@ -337,6 +349,20 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <Association Name="FK_OrderDishes_Dishes">
+          <End Role="Dishes" Type="Self.Dishes" Multiplicity="1">
+            <OnDelete Action="Cascade" />
+          </End>
+          <End Role="OrderDishes" Type="Self.OrderDishes" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Dishes">
+              <PropertyRef Name="ID" />
+            </Principal>
+            <Dependent Role="OrderDishes">
+              <PropertyRef Name="DishID" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <Association Name="FK_Employee_Position">
           <End Role="Position" Type="Self.Position" Multiplicity="1">
             <OnDelete Action="Cascade" />
@@ -405,15 +431,26 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="OrderDishes">
-          <End Role="Dishes" Type="Self.Dishes" Multiplicity="*" />
-          <End Role="Order" Type="Self.Order" Multiplicity="*" />
+        <Association Name="FK_OrderDishes_Order">
+          <End Role="Order" Type="Self.Order" Multiplicity="1">
+            <OnDelete Action="Cascade" />
+          </End>
+          <End Role="OrderDishes" Type="Self.OrderDishes" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Order">
+              <PropertyRef Name="ID" />
+            </Principal>
+            <Dependent Role="OrderDishes">
+              <PropertyRef Name="OrderID" />
+            </Dependent>
+          </ReferentialConstraint>
         </Association>
         <EntityContainer Name="KafeDBEntities" annotation:LazyLoadingEnabled="true">
           <EntitySet Name="CookStatus" EntityType="Self.CookStatus" />
           <EntitySet Name="Dishes" EntityType="Self.Dishes" />
           <EntitySet Name="Employee" EntityType="Self.Employee" />
           <EntitySet Name="Order" EntityType="Self.Order" />
+          <EntitySet Name="OrderDishes" EntityType="Self.OrderDishes" />
           <EntitySet Name="PayStatus" EntityType="Self.PayStatus" />
           <EntitySet Name="Position" EntityType="Self.Position" />
           <EntitySet Name="Shift" EntityType="Self.Shift" />
@@ -422,6 +459,10 @@
             <End Role="CookStatus" EntitySet="CookStatus" />
             <End Role="Order" EntitySet="Order" />
           </AssociationSet>
+          <AssociationSet Name="FK_OrderDishes_Dishes" Association="Self.FK_OrderDishes_Dishes">
+            <End Role="Dishes" EntitySet="Dishes" />
+            <End Role="OrderDishes" EntitySet="OrderDishes" />
+          </AssociationSet>
           <AssociationSet Name="FK_Employee_Position" Association="Self.FK_Employee_Position">
             <End Role="Position" EntitySet="Position" />
             <End Role="Employee" EntitySet="Employee" />
@@ -442,9 +483,9 @@
             <End Role="PayStatus" EntitySet="PayStatus" />
             <End Role="Order" EntitySet="Order" />
           </AssociationSet>
-          <AssociationSet Name="OrderDishes" Association="Self.OrderDishes">
-            <End Role="Dishes" EntitySet="Dishes" />
+          <AssociationSet Name="FK_OrderDishes_Order" Association="Self.FK_OrderDishes_Order">
             <End Role="Order" EntitySet="Order" />
+            <End Role="OrderDishes" EntitySet="OrderDishes" />
           </AssociationSet>
         </EntityContainer>
       </Schema>
@@ -497,6 +538,15 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
+          <EntitySetMapping Name="OrderDishes">
+            <EntityTypeMapping TypeName="KafeDBModel.OrderDishes">
+              <MappingFragment StoreEntitySet="OrderDishes">
+                <ScalarProperty Name="OrderID" ColumnName="OrderID" />
+                <ScalarProperty Name="DishID" ColumnName="DishID" />
+                <ScalarProperty Name="Count" ColumnName="Count" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
           <EntitySetMapping Name="PayStatus">
             <EntityTypeMapping TypeName="KafeDBModel.PayStatus">
               <MappingFragment StoreEntitySet="PayStatus">
@@ -529,14 +579,6 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
-          <AssociationSetMapping Name="OrderDishes" TypeName="KafeDBModel.OrderDishes" StoreEntitySet="OrderDishes">
-            <EndProperty Name="Dishes">
-              <ScalarProperty Name="ID" ColumnName="DishID" />
-            </EndProperty>
-            <EndProperty Name="Order">
-              <ScalarProperty Name="ID" ColumnName="OrderID" />
-            </EndProperty>
-          </AssociationSetMapping>
         </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>

+ 7 - 5
Kafe/Kafe/Model.edmx.diagram

@@ -4,22 +4,24 @@
   <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
-      <Diagram DiagramId="93dbfb46cdeb4919abe11f1d01f5c784" Name="Diagram1">
-        <EntityTypeShape EntityType="KafeDBModel.CookStatus" Width="1.5" PointX="3" PointY="7.875" IsExpanded="true" />
-        <EntityTypeShape EntityType="KafeDBModel.Dishes" Width="1.5" PointX="3" PointY="10.25" IsExpanded="true" />
+      <Diagram DiagramId="04ce8728a8d64180a36086120d1f5b06" Name="Diagram1">
+        <EntityTypeShape EntityType="KafeDBModel.CookStatus" Width="1.5" PointX="3" PointY="7.625" IsExpanded="true" />
+        <EntityTypeShape EntityType="KafeDBModel.Dishes" Width="1.5" PointX="5.25" PointY="10.5" IsExpanded="true" />
         <EntityTypeShape EntityType="KafeDBModel.Employee" Width="1.5" PointX="3" PointY="2.875" IsExpanded="true" />
         <EntityTypeShape EntityType="KafeDBModel.Order" Width="1.5" PointX="5.25" PointY="3.125" IsExpanded="true" />
-        <EntityTypeShape EntityType="KafeDBModel.PayStatus" Width="1.5" PointX="3" PointY="13" IsExpanded="true" />
+        <EntityTypeShape EntityType="KafeDBModel.OrderDishes" Width="1.5" PointX="7.5" PointY="3.5" IsExpanded="true" />
+        <EntityTypeShape EntityType="KafeDBModel.PayStatus" Width="1.5" PointX="3" PointY="10.875" IsExpanded="true" />
         <EntityTypeShape EntityType="KafeDBModel.Position" Width="1.5" PointX="0.75" PointY="3.75" IsExpanded="true" />
         <EntityTypeShape EntityType="KafeDBModel.Shift" Width="1.5" PointX="5.25" PointY="7.5" IsExpanded="true" />
         <EntityTypeShape EntityType="KafeDBModel.Status" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
         <AssociationConnector Association="KafeDBModel.FK_Order_CookStatus" ManuallyRouted="false" />
+        <AssociationConnector Association="KafeDBModel.FK_OrderDishes_Dishes" ManuallyRouted="false" />
         <AssociationConnector Association="KafeDBModel.FK_Employee_Position" ManuallyRouted="false" />
         <AssociationConnector Association="KafeDBModel.FK_Employee_Status" ManuallyRouted="false" />
         <AssociationConnector Association="KafeDBModel.FK_Order_Employee" ManuallyRouted="false" />
         <AssociationConnector Association="KafeDBModel.FK_Shift_Employee" ManuallyRouted="false" />
         <AssociationConnector Association="KafeDBModel.FK_Order_PayStatus" ManuallyRouted="false" />
-        <AssociationConnector Association="KafeDBModel.OrderDishes" ManuallyRouted="false" />
+        <AssociationConnector Association="KafeDBModel.FK_OrderDishes_Order" ManuallyRouted="false" />
       </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 2 - 2
Kafe/Kafe/Order.cs

@@ -17,7 +17,7 @@ namespace Kafe
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
         public Order()
         {
-            this.Dishes = new HashSet<Dishes>();
+            this.OrderDishes = new HashSet<OrderDishes>();
         }
     
         public int ID { get; set; }
@@ -31,6 +31,6 @@ namespace Kafe
         public virtual Employee Employee { get; set; }
         public virtual PayStatus PayStatus { get; set; }
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
-        public virtual ICollection<Dishes> Dishes { get; set; }
+        public virtual ICollection<OrderDishes> OrderDishes { get; set; }
     }
 }

+ 24 - 0
Kafe/Kafe/OrderDishes.cs

@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Kafe
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class OrderDishes
+    {
+        public int OrderID { get; set; }
+        public int DishID { get; set; }
+        public int Count { get; set; }
+    
+        public virtual Dishes Dishes { get; set; }
+        public virtual Order Order { get; set; }
+    }
+}

+ 13 - 0
Kafe/Kafe/Partial.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Kafe
+{
+    public partial class Order
+    {
+        public double Cost => OrderDishes.Sum(x => x.Dishes.Cost * x.Count);
+    }
+}

+ 6 - 2
Kafe/Kafe/Windows/AdminWindow.xaml

@@ -5,8 +5,12 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:Kafe.Windows"
         mc:Ignorable="d"
-        Title="Администратор" Height="450" Width="800">
+        Title="Администратор" Height="450" Width="800" ResizeMode="NoResize">
     <Grid>
-        
+        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Width="130">
+            <Button x:Name="Employee" Content="Сотрудники" Click="EmployeeBtn_Click" Height="23" Margin="5"/>
+            <Button x:Name="Order" Content="Заказы" Click="OrderBtn_Click" Height="23" Margin="5"/>
+            <Button x:Name="Dishes" Content="Смены" Click="DishesBtn_Click" Height="23" Margin="5"/>
+        </StackPanel>
     </Grid>
 </Window>

+ 19 - 0
Kafe/Kafe/Windows/AdminWindow.xaml.cs

@@ -23,5 +23,24 @@ namespace Kafe.Windows
         {
             InitializeComponent();
         }
+
+        private void EmployeeBtn_Click(object sender, RoutedEventArgs e)
+        {
+            new EmployeeWindow().Show();
+            this.Close();
+        }
+
+        private void OrderBtn_Click(object sender, RoutedEventArgs e)
+        {
+            new OrderWindow().Show();
+            this.Close();
+        }
+
+        private void DishesBtn_Click(object sender, RoutedEventArgs e)
+        {
+            new DishesWindow().Show();
+            this.Close();
+        }
+
     }
 }

+ 1 - 1
Kafe/Kafe/Windows/CookerWindow.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:Kafe.Windows"
         mc:Ignorable="d"
-        Title="Повар" Height="450" Width="800">
+        Title="Повар" Height="450" Width="800" ResizeMode="NoResize">
     <Grid>
         
     </Grid>

+ 12 - 0
Kafe/Kafe/Windows/DishesWindow.xaml

@@ -0,0 +1,12 @@
+<Window x:Class="Kafe.Windows.DishesWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:Kafe.Windows"
+        mc:Ignorable="d"
+        Title="Смены" Height="450" Width="800">
+    <Grid>
+        
+    </Grid>
+</Window>

+ 27 - 0
Kafe/Kafe/Windows/DishesWindow.xaml.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Kafe.Windows
+{
+    /// <summary>
+    /// Логика взаимодействия для DishesWindow.xaml
+    /// </summary>
+    public partial class DishesWindow : Window
+    {
+        public DishesWindow()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 12 - 0
Kafe/Kafe/Windows/EmployeeWindow.xaml

@@ -0,0 +1,12 @@
+<Window x:Class="Kafe.Windows.EmployeeWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:Kafe.Windows"
+        mc:Ignorable="d"
+        Title="Сотрудники" Height="450" Width="800">
+    <Grid>
+        
+    </Grid>
+</Window>

+ 27 - 0
Kafe/Kafe/Windows/EmployeeWindow.xaml.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Kafe.Windows
+{
+    /// <summary>
+    /// Логика взаимодействия для EmployeeWindow.xaml
+    /// </summary>
+    public partial class EmployeeWindow : Window
+    {
+        public EmployeeWindow()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 12 - 0
Kafe/Kafe/Windows/OrderWindow.xaml

@@ -0,0 +1,12 @@
+<Window x:Class="Kafe.Windows.OrderWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:Kafe.Windows"
+        mc:Ignorable="d"
+        Title="Заказы" Height="450" Width="800" ResizeMode="NoResize">
+    <Grid>
+        
+    </Grid>
+</Window>

+ 27 - 0
Kafe/Kafe/Windows/OrderWindow.xaml.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Kafe.Windows
+{
+    /// <summary>
+    /// Логика взаимодействия для OrderWindow.xaml
+    /// </summary>
+    public partial class OrderWindow : Window
+    {
+        public OrderWindow()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 1 - 1
Kafe/Kafe/Windows/WaiterWindow.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:Kafe.Windows"
         mc:Ignorable="d"
-        Title="Официант" Height="450" Width="800">
+        Title="Официант" Height="450" Width="800" ResizeMode="NoResize">
     <Grid>
         
     </Grid>

BIN=BIN
Kafe/Kafe/bin/Debug/Kafe.exe


+ 3 - 1
Kafe/Kafe/bin/Debug/Kafe.exe.config

@@ -17,4 +17,6 @@
       <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
     </providers>
   </entityFramework>
-<connectionStrings><add name="KafeDBEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(localdb)\MSSQLLocalDB;initial catalog=KafeDB;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings></configuration>
+<connectionStrings>
+  
+<add name="KafeDBEntities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(localdb)\MSSQLLocalDB;initial catalog=KafeDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings></configuration>

BIN=BIN
Kafe/Kafe/bin/Debug/Kafe.pdb


+ 1 - 1
Kafe/Kafe/obj/Debug/Kafe.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-ee9294f87a2d5fd14e3a1f9e6f7a93e913e36044
+203af634777c72ac566b42932bac3d79ce549e40

+ 2 - 0
Kafe/Kafe/obj/Debug/Kafe.csproj.FileListAbsolute.txt

@@ -27,3 +27,5 @@ Z:\git\Kafe\Kafe\obj\Debug\Kafe.csproj.CoreCompileInputs.cache
 Z:\git\Kafe\Kafe\obj\Debug\Kafe.csproj.CopyComplete
 Z:\git\Kafe\Kafe\obj\Debug\Kafe.exe
 Z:\git\Kafe\Kafe\obj\Debug\Kafe.pdb
+Z:\git\Kafe\Kafe\obj\Debug\Windows\OrderWindow.g.cs
+Z:\git\Kafe\Kafe\obj\Debug\Windows\OrderWindow.baml

BIN=BIN
Kafe/Kafe/obj/Debug/Kafe.exe


BIN=BIN
Kafe/Kafe/obj/Debug/Kafe.g.resources


BIN=BIN
Kafe/Kafe/obj/Debug/Kafe.pdb


+ 3 - 3
Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 Z:\git\Kafe\Kafe\App.xaml
-4-1526805116
+5-506512193
 22035508349
-20-1881302862
+221256018501
 18-1273807529
-MainWindow.xaml;Windows\AdminWindow.xaml;Windows\CookerWindow.xaml;Windows\WaiterWindow.xaml;
+MainWindow.xaml;Windows\AdminWindow.xaml;Windows\CookerWindow.xaml;Windows\OrderWindow.xaml;Windows\WaiterWindow.xaml;
 
 False
 

+ 3 - 3
Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.i.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 Z:\git\Kafe\Kafe\App.xaml
-4-1526805116
+7-1931559813
 22035508349
-21331575816
+261409067376
 18-1273807529
-MainWindow.xaml;Windows\AdminWindow.xaml;Windows\CookerWindow.xaml;Windows\WaiterWindow.xaml;
+MainWindow.xaml;Windows\AdminWindow.xaml;Windows\CookerWindow.xaml;Windows\DishesWindow.xaml;Windows\EmployeeWindow.xaml;Windows\OrderWindow.xaml;Windows\WaiterWindow.xaml;
 
 True
 

+ 2 - 1
Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.i.lref

@@ -1,4 +1,5 @@
 
 
-FZ:\git\Kafe\Kafe\Windows\WaiterWindow.xaml;;
+FZ:\git\Kafe\Kafe\Windows\DishesWindow.xaml;;
+FZ:\git\Kafe\Kafe\Windows\EmployeeWindow.xaml;;
 

+ 1 - 0
Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.lref

@@ -4,4 +4,5 @@ FZ:\git\Kafe\Kafe\MainWindow.xaml;;
 FZ:\git\Kafe\Kafe\Windows\AdminWindow.xaml;;
 FZ:\git\Kafe\Kafe\Windows\CookerWindow.xaml;;
 FZ:\git\Kafe\Kafe\Windows\WaiterWindow.xaml;;
+FZ:\git\Kafe\Kafe\Windows\OrderWindow.xaml;;
 

BIN=BIN
Kafe/Kafe/obj/Debug/TempPE/Model.Designer.cs.dll


BIN=BIN
Kafe/Kafe/obj/Debug/TempPE/Model.cs.dll


BIN=BIN
Kafe/Kafe/obj/Debug/Windows/AdminWindow.baml


+ 55 - 1
Kafe/Kafe/obj/Debug/Windows/AdminWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\Windows\AdminWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F2600058642277F9BF1ED588D835076A46FECD0777ED8A96D407B762E8D21C55"
+#pragma checksum "..\..\..\Windows\AdminWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4A106CB77E7C579F2B50C2ED7B5DF6AD1797E4F2DEF18D52639549C7F4B7ABE3"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -40,6 +40,30 @@ namespace Kafe.Windows {
     /// </summary>
     public partial class AdminWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
+        
+        #line 11 "..\..\..\Windows\AdminWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Users;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 12 "..\..\..\Windows\AdminWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Orders;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 13 "..\..\..\Windows\AdminWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Dishes;
+        
+        #line default
+        #line hidden
+        
         private bool _contentLoaded;
         
         /// <summary>
@@ -68,6 +92,36 @@ namespace Kafe.Windows {
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
         void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.Users = ((System.Windows.Controls.Button)(target));
+            
+            #line 11 "..\..\..\Windows\AdminWindow.xaml"
+            this.Users.Click += new System.Windows.RoutedEventHandler(this.Users_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.Orders = ((System.Windows.Controls.Button)(target));
+            
+            #line 12 "..\..\..\Windows\AdminWindow.xaml"
+            this.Orders.Click += new System.Windows.RoutedEventHandler(this.Orders_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.Dishes = ((System.Windows.Controls.Button)(target));
+            
+            #line 13 "..\..\..\Windows\AdminWindow.xaml"
+            this.Dishes.Click += new System.Windows.RoutedEventHandler(this.Dishes_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
             this._contentLoaded = true;
         }
     }

+ 55 - 1
Kafe/Kafe/obj/Debug/Windows/AdminWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\Windows\AdminWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F2600058642277F9BF1ED588D835076A46FECD0777ED8A96D407B762E8D21C55"
+#pragma checksum "..\..\..\Windows\AdminWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2BFCFAC4902F384D50000582BA1CCCBF0137A6517EDCE6C63CF2045D94C7FE6A"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -40,6 +40,30 @@ namespace Kafe.Windows {
     /// </summary>
     public partial class AdminWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
+        
+        #line 11 "..\..\..\Windows\AdminWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Employee;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 12 "..\..\..\Windows\AdminWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Order;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 13 "..\..\..\Windows\AdminWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Dishes;
+        
+        #line default
+        #line hidden
+        
         private bool _contentLoaded;
         
         /// <summary>
@@ -68,6 +92,36 @@ namespace Kafe.Windows {
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
         void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.Employee = ((System.Windows.Controls.Button)(target));
+            
+            #line 11 "..\..\..\Windows\AdminWindow.xaml"
+            this.Employee.Click += new System.Windows.RoutedEventHandler(this.EmployeeBtn_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.Order = ((System.Windows.Controls.Button)(target));
+            
+            #line 12 "..\..\..\Windows\AdminWindow.xaml"
+            this.Order.Click += new System.Windows.RoutedEventHandler(this.OrderBtn_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.Dishes = ((System.Windows.Controls.Button)(target));
+            
+            #line 13 "..\..\..\Windows\AdminWindow.xaml"
+            this.Dishes.Click += new System.Windows.RoutedEventHandler(this.DishesBtn_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
             this._contentLoaded = true;
         }
     }

BIN=BIN
Kafe/Kafe/obj/Debug/Windows/CookerWindow.baml


+ 1 - 1
Kafe/Kafe/obj/Debug/Windows/CookerWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\Windows\CookerWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3BF220A2C06B75135DE1642FCA388B6F2B0596691B4DF447088A01ED0357B487"
+#pragma checksum "..\..\..\Windows\CookerWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F41D97301D074CB93A64FD57C0EE29471CD79AE65EEDD6A7EC846BA21984FE40"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.

+ 1 - 1
Kafe/Kafe/obj/Debug/Windows/CookerWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\Windows\CookerWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3BF220A2C06B75135DE1642FCA388B6F2B0596691B4DF447088A01ED0357B487"
+#pragma checksum "..\..\..\Windows\CookerWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F41D97301D074CB93A64FD57C0EE29471CD79AE65EEDD6A7EC846BA21984FE40"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.

+ 75 - 0
Kafe/Kafe/obj/Debug/Windows/DishesWindow.g.i.cs

@@ -0,0 +1,75 @@
+#pragma checksum "..\..\..\Windows\DishesWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A67707B16302CE63E0ED67A21B97FB128E54F964B1DE34A31A140DEF095DDB33"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Kafe.Windows;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace Kafe.Windows {
+    
+    
+    /// <summary>
+    /// DishesWindow
+    /// </summary>
+    public partial class DishesWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/Kafe;component/windows/disheswindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\..\Windows\DishesWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 75 - 0
Kafe/Kafe/obj/Debug/Windows/EmployeeWindow.g.i.cs

@@ -0,0 +1,75 @@
+#pragma checksum "..\..\..\Windows\EmployeeWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "19A1D501DF06B87567EB00E084EF9B243FEA6FA784CA4B2147182016C39156E0"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Kafe.Windows;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace Kafe.Windows {
+    
+    
+    /// <summary>
+    /// EmployeeWindow
+    /// </summary>
+    public partial class EmployeeWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/Kafe;component/windows/employeewindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\..\Windows\EmployeeWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            this._contentLoaded = true;
+        }
+    }
+}
+

BIN=BIN
Kafe/Kafe/obj/Debug/Windows/OrderWindow.baml


+ 75 - 0
Kafe/Kafe/obj/Debug/Windows/OrderWindow.g.cs

@@ -0,0 +1,75 @@
+#pragma checksum "..\..\..\Windows\OrderWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "5CB5D3AF40499F59C6FB5BD2427313F62CB3470726455656EEB61288E3BEC86C"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Kafe.Windows;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace Kafe.Windows {
+    
+    
+    /// <summary>
+    /// OrderWindow
+    /// </summary>
+    public partial class OrderWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/Kafe;component/windows/orderwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\..\Windows\OrderWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 75 - 0
Kafe/Kafe/obj/Debug/Windows/OrderWindow.g.i.cs

@@ -0,0 +1,75 @@
+#pragma checksum "..\..\..\Windows\OrderWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "5CB5D3AF40499F59C6FB5BD2427313F62CB3470726455656EEB61288E3BEC86C"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Kafe.Windows;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace Kafe.Windows {
+    
+    
+    /// <summary>
+    /// OrderWindow
+    /// </summary>
+    public partial class OrderWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/Kafe;component/windows/orderwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\..\Windows\OrderWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            this._contentLoaded = true;
+        }
+    }
+}
+

BIN=BIN
Kafe/Kafe/obj/Debug/Windows/WaiterWindow.baml


+ 1 - 1
Kafe/Kafe/obj/Debug/Windows/WaiterWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\Windows\WaiterWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FDFB61B0158200E334DBFB9F663D8170DFE70D22B8E622FAA27CFCD27F4B8C28"
+#pragma checksum "..\..\..\Windows\WaiterWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "30427C5DE7F2CA475C407CCB63D909F96328E03BD855CEDC3997450310CEC18F"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.

+ 1 - 1
Kafe/Kafe/obj/Debug/Windows/WaiterWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\Windows\WaiterWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FDFB61B0158200E334DBFB9F663D8170DFE70D22B8E622FAA27CFCD27F4B8C28"
+#pragma checksum "..\..\..\Windows\WaiterWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "30427C5DE7F2CA475C407CCB63D909F96328E03BD855CEDC3997450310CEC18F"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.

+ 47 - 7
Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.csdl

@@ -16,7 +16,7 @@
     <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
     <Property Name="Cost" Type="Double" Nullable="false" />
     <Property Name="CookTime" Type="Int32" Nullable="false" />
-    <NavigationProperty Name="Order" Relationship="Self.OrderDishes" FromRole="Dishes" ToRole="Order" />
+    <NavigationProperty Name="OrderDishes" Relationship="Self.FK_OrderDishes_Dishes" FromRole="Dishes" ToRole="OrderDishes" />
   </EntityType>
   <EntityType Name="Employee">
     <Key>
@@ -48,7 +48,18 @@
     <NavigationProperty Name="CookStatus" Relationship="Self.FK_Order_CookStatus" FromRole="Order" ToRole="CookStatus" />
     <NavigationProperty Name="Employee" Relationship="Self.FK_Order_Employee" FromRole="Order" ToRole="Employee" />
     <NavigationProperty Name="PayStatus" Relationship="Self.FK_Order_PayStatus" FromRole="Order" ToRole="PayStatus" />
-    <NavigationProperty Name="Dishes" Relationship="Self.OrderDishes" FromRole="Order" ToRole="Dishes" />
+    <NavigationProperty Name="OrderDishes" Relationship="Self.FK_OrderDishes_Order" FromRole="Order" ToRole="OrderDishes" />
+  </EntityType>
+  <EntityType Name="OrderDishes">
+    <Key>
+      <PropertyRef Name="OrderID" />
+      <PropertyRef Name="DishID" />
+    </Key>
+    <Property Name="OrderID" Type="Int32" Nullable="false" />
+    <Property Name="DishID" Type="Int32" Nullable="false" />
+    <Property Name="Count" Type="Int32" />
+    <NavigationProperty Name="Dishes" Relationship="Self.FK_OrderDishes_Dishes" FromRole="OrderDishes" ToRole="Dishes" />
+    <NavigationProperty Name="Order" Relationship="Self.FK_OrderDishes_Order" FromRole="OrderDishes" ToRole="Order" />
   </EntityType>
   <EntityType Name="PayStatus">
     <Key>
@@ -97,6 +108,20 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
+  <Association Name="FK_OrderDishes_Dishes">
+    <End Role="Dishes" Type="Self.Dishes" Multiplicity="1">
+      <OnDelete Action="Cascade" />
+    </End>
+    <End Role="OrderDishes" Type="Self.OrderDishes" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Dishes">
+        <PropertyRef Name="ID" />
+      </Principal>
+      <Dependent Role="OrderDishes">
+        <PropertyRef Name="DishID" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
   <Association Name="FK_Employee_Position">
     <End Role="Position" Type="Self.Position" Multiplicity="1">
       <OnDelete Action="Cascade" />
@@ -165,15 +190,26 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
-  <Association Name="OrderDishes">
-    <End Role="Dishes" Type="Self.Dishes" Multiplicity="*" />
-    <End Role="Order" Type="Self.Order" Multiplicity="*" />
+  <Association Name="FK_OrderDishes_Order">
+    <End Role="Order" Type="Self.Order" Multiplicity="1">
+      <OnDelete Action="Cascade" />
+    </End>
+    <End Role="OrderDishes" Type="Self.OrderDishes" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Order">
+        <PropertyRef Name="ID" />
+      </Principal>
+      <Dependent Role="OrderDishes">
+        <PropertyRef Name="OrderID" />
+      </Dependent>
+    </ReferentialConstraint>
   </Association>
   <EntityContainer Name="KafeDBEntities" annotation:LazyLoadingEnabled="true">
     <EntitySet Name="CookStatus" EntityType="Self.CookStatus" />
     <EntitySet Name="Dishes" EntityType="Self.Dishes" />
     <EntitySet Name="Employee" EntityType="Self.Employee" />
     <EntitySet Name="Order" EntityType="Self.Order" />
+    <EntitySet Name="OrderDishes" EntityType="Self.OrderDishes" />
     <EntitySet Name="PayStatus" EntityType="Self.PayStatus" />
     <EntitySet Name="Position" EntityType="Self.Position" />
     <EntitySet Name="Shift" EntityType="Self.Shift" />
@@ -182,6 +218,10 @@
       <End Role="CookStatus" EntitySet="CookStatus" />
       <End Role="Order" EntitySet="Order" />
     </AssociationSet>
+    <AssociationSet Name="FK_OrderDishes_Dishes" Association="Self.FK_OrderDishes_Dishes">
+      <End Role="Dishes" EntitySet="Dishes" />
+      <End Role="OrderDishes" EntitySet="OrderDishes" />
+    </AssociationSet>
     <AssociationSet Name="FK_Employee_Position" Association="Self.FK_Employee_Position">
       <End Role="Position" EntitySet="Position" />
       <End Role="Employee" EntitySet="Employee" />
@@ -202,9 +242,9 @@
       <End Role="PayStatus" EntitySet="PayStatus" />
       <End Role="Order" EntitySet="Order" />
     </AssociationSet>
-    <AssociationSet Name="OrderDishes" Association="Self.OrderDishes">
-      <End Role="Dishes" EntitySet="Dishes" />
+    <AssociationSet Name="FK_OrderDishes_Order" Association="Self.FK_OrderDishes_Order">
       <End Role="Order" EntitySet="Order" />
+      <End Role="OrderDishes" EntitySet="OrderDishes" />
     </AssociationSet>
   </EntityContainer>
 </Schema>

+ 9 - 8
Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.msl

@@ -45,6 +45,15 @@
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
+    <EntitySetMapping Name="OrderDishes">
+      <EntityTypeMapping TypeName="KafeDBModel.OrderDishes">
+        <MappingFragment StoreEntitySet="OrderDishes">
+          <ScalarProperty Name="OrderID" ColumnName="OrderID" />
+          <ScalarProperty Name="DishID" ColumnName="DishID" />
+          <ScalarProperty Name="Count" ColumnName="Count" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
     <EntitySetMapping Name="PayStatus">
       <EntityTypeMapping TypeName="KafeDBModel.PayStatus">
         <MappingFragment StoreEntitySet="PayStatus">
@@ -77,13 +86,5 @@
         </MappingFragment>
       </EntityTypeMapping>
     </EntitySetMapping>
-    <AssociationSetMapping Name="OrderDishes" TypeName="KafeDBModel.OrderDishes" StoreEntitySet="OrderDishes">
-      <EndProperty Name="Dishes">
-        <ScalarProperty Name="ID" ColumnName="DishID" />
-      </EndProperty>
-      <EndProperty Name="Order">
-        <ScalarProperty Name="ID" ColumnName="OrderID" />
-      </EndProperty>
-    </AssociationSetMapping>
   </EntityContainerMapping>
 </Mapping>

+ 1 - 0
Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.ssdl

@@ -47,6 +47,7 @@
     </Key>
     <Property Name="OrderID" Type="int" Nullable="false" />
     <Property Name="DishID" Type="int" Nullable="false" />
+    <Property Name="Count" Type="int" />
   </EntityType>
   <EntityType Name="PayStatus">
     <Key>

BIN=BIN
db.sql