Kaynağa Gözat

fiveth commit

Фельдбейн Артур Станиславович 3 yıl önce
ebeveyn
işleme
5fb7a31327
57 değiştirilmiş dosya ile 677 ekleme ve 163 silme
  1. BIN
      DB.sql
  2. BIN
      Kafe/.vs/Kafe/v17/.suo
  3. 1 3
      Kafe/Kafe/App.config
  4. 2 2
      Kafe/Kafe/Dish.cs
  5. 1 1
      Kafe/Kafe/DishOrder.cs
  6. 2 2
      Kafe/Kafe/Employee.cs
  7. 3 3
      Kafe/Kafe/Helper.cs
  8. 10 11
      Kafe/Kafe/Kafe.csproj
  9. 1 1
      Kafe/Kafe/MainWindow.xaml.cs
  10. 3 3
      Kafe/Kafe/Model.Context.cs
  11. 53 53
      Kafe/Kafe/Model.edmx
  12. 1 1
      Kafe/Kafe/Model.edmx.diagram
  13. 5 5
      Kafe/Kafe/Order.cs
  14. 5 1
      Kafe/Kafe/Windows/AdminWindow.xaml
  15. 19 0
      Kafe/Kafe/Windows/AdminWindow.xaml.cs
  16. 33 1
      Kafe/Kafe/Windows/EmployeeWindow.xaml
  17. 11 0
      Kafe/Kafe/Windows/EmployeeWindow.xaml.cs
  18. BIN
      Kafe/Kafe/bin/Debug/Kafe.exe
  19. 1 3
      Kafe/Kafe/bin/Debug/Kafe.exe.config
  20. BIN
      Kafe/Kafe/bin/Debug/Kafe.pdb
  21. 1 1
      Kafe/Kafe/obj/Debug/Kafe.csproj.CoreCompileInputs.cache
  22. 6 0
      Kafe/Kafe/obj/Debug/Kafe.csproj.FileListAbsolute.txt
  23. BIN
      Kafe/Kafe/obj/Debug/Kafe.exe
  24. BIN
      Kafe/Kafe/obj/Debug/Kafe.g.resources
  25. BIN
      Kafe/Kafe/obj/Debug/Kafe.pdb
  26. 3 3
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.cache
  27. 1 1
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.i.cache
  28. 0 4
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.i.lref
  29. 3 0
      Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.lref
  30. BIN
      Kafe/Kafe/obj/Debug/MainWindow.baml
  31. 1 1
      Kafe/Kafe/obj/Debug/MainWindow.g.cs
  32. 1 1
      Kafe/Kafe/obj/Debug/MainWindow.g.i.cs
  33. BIN
      Kafe/Kafe/obj/Debug/TempPE/Model.Designer.cs.dll
  34. BIN
      Kafe/Kafe/obj/Debug/TempPE/Model.cs.dll
  35. BIN
      Kafe/Kafe/obj/Debug/Windows/AdminWindow.baml
  36. 55 1
      Kafe/Kafe/obj/Debug/Windows/AdminWindow.g.cs
  37. 55 1
      Kafe/Kafe/obj/Debug/Windows/AdminWindow.g.i.cs
  38. BIN
      Kafe/Kafe/obj/Debug/Windows/CookerWindow.baml
  39. 1 1
      Kafe/Kafe/obj/Debug/Windows/CookerWindow.g.cs
  40. 1 1
      Kafe/Kafe/obj/Debug/Windows/CookerWindow.g.i.cs
  41. 75 0
      Kafe/Kafe/obj/Debug/Windows/DishesWindow.g.i.cs
  42. BIN
      Kafe/Kafe/obj/Debug/Windows/EmployeeWindow.baml
  43. 95 0
      Kafe/Kafe/obj/Debug/Windows/EmployeeWindow.g.cs
  44. 21 1
      Kafe/Kafe/obj/Debug/Windows/EmployeeWindow.g.i.cs
  45. BIN
      Kafe/Kafe/obj/Debug/Windows/OrderWindow.baml
  46. 75 0
      Kafe/Kafe/obj/Debug/Windows/OrderWindow.g.cs
  47. 1 1
      Kafe/Kafe/obj/Debug/Windows/OrderWindow.g.i.cs
  48. BIN
      Kafe/Kafe/obj/Debug/Windows/ShiftWindow.baml
  49. 75 0
      Kafe/Kafe/obj/Debug/Windows/ShiftWindow.g.cs
  50. 1 1
      Kafe/Kafe/obj/Debug/Windows/ShiftWindow.g.i.cs
  51. BIN
      Kafe/Kafe/obj/Debug/Windows/WaiterWindow.baml
  52. 1 1
      Kafe/Kafe/obj/Debug/Windows/WaiterWindow.g.cs
  53. 1 1
      Kafe/Kafe/obj/Debug/Windows/WaiterWindow.g.i.cs
  54. 26 26
      Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.csdl
  55. 2 2
      Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.msl
  56. 25 25
      Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.ssdl
  57. BIN
      NEW DB.vsdx

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


+ 1 - 3
Kafe/Kafe/App.config

@@ -8,9 +8,7 @@
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
   </startup>
   <connectionStrings>
-    <add name="Kafe2Entities" 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=Kafe2;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
-    <add name="Kafe2Entities1" 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=Kafe2;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
-  </connectionStrings>
+  <add name="Kafe2Entities" 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=Kafe2;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
   <entityFramework>
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
       <parameters>

+ 2 - 2
Kafe/Kafe/Dish.cs

@@ -22,8 +22,8 @@ namespace Kafe
     
         public int ID { get; set; }
         public string Title { get; set; }
-        public Nullable<double> Cost { get; set; }
-        public Nullable<int> CookTime { get; set; }
+        public double Cost { get; set; }
+        public int CookTime { get; set; }
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<DishOrder> DishOrder { get; set; }

+ 1 - 1
Kafe/Kafe/DishOrder.cs

@@ -16,7 +16,7 @@ namespace Kafe
     {
         public int OrderID { get; set; }
         public int DishID { get; set; }
-        public Nullable<int> Count { get; set; }
+        public int Count { get; set; }
     
         public virtual Dish Dish { get; set; }
         public virtual Order Order { get; set; }

+ 2 - 2
Kafe/Kafe/Employee.cs

@@ -25,10 +25,10 @@ namespace Kafe
         public string LastName { get; set; }
         public string FirstName { get; set; }
         public string MiddleName { get; set; }
-        public Nullable<int> PostitonID { get; set; }
+        public int PositionID { get; set; }
         public string Login { get; set; }
         public string Password { get; set; }
-        public Nullable<int> StatusID { get; set; }
+        public int StatusID { get; set; }
     
         public virtual Position Position { get; set; }
         public virtual Status Status { get; set; }

+ 3 - 3
Kafe/Kafe/Helper.cs

@@ -8,11 +8,11 @@ namespace Kafe
 {
     public class Helper
     {
-        private static Kafe2Entities1 s_context;
-        public static Kafe2Entities1 GetContext()
+        private static Kafe2Entities s_context;
+        public static Kafe2Entities GetContext()
         {
             if (s_context == null)
-                s_context = new Kafe2Entities1();
+                s_context = new Kafe2Entities();
             return s_context;
         }
     }

+ 10 - 11
Kafe/Kafe/Kafe.csproj

@@ -76,11 +76,21 @@
     <Compile Include="Employee.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
+    <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>
@@ -153,16 +163,6 @@
     </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>
@@ -196,7 +196,6 @@
   <ItemGroup>
     <None Include="App.config" />
   </ItemGroup>
-  <ItemGroup />
   <ItemGroup>
     <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
   </ItemGroup>

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

@@ -47,7 +47,7 @@ namespace Kafe
             if (user.Select(i => i.Login).Contains(login)
                 && user.Select(i => i.Password).Contains(password))
             {
-                role = user.Where(i => i.Login == login && i.Password == password).Select(i => i.ID).FirstOrDefault();
+                role = user.Where(i => i.Login == login && i.Password == password).Select(i => i.PositionID).FirstOrDefault();
                 id = user.Where(i => i.Login == login && i.Password == password).Select(i => i.ID).FirstOrDefault();
 
                 if (role == 1)

+ 3 - 3
Kafe/Kafe/Model.Context.cs

@@ -13,10 +13,10 @@ namespace Kafe
     using System.Data.Entity;
     using System.Data.Entity.Infrastructure;
     
-    public partial class Kafe2Entities1 : DbContext
+    public partial class Kafe2Entities : DbContext
     {
-        public Kafe2Entities1()
-            : base("name=Kafe2Entities1")
+        public Kafe2Entities()
+            : base("name=Kafe2Entities")
         {
         }
     

+ 53 - 53
Kafe/Kafe/Model.edmx

@@ -10,16 +10,16 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Title" Type="nvarchar" MaxLength="50" />
+          <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
         </EntityType>
         <EntityType Name="Dish">
           <Key>
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Title" Type="nvarchar" MaxLength="50" />
-          <Property Name="Cost" Type="float" />
-          <Property Name="CookTime" Type="int" />
+          <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="Cost" Type="float" Nullable="false" />
+          <Property Name="CookTime" Type="int" Nullable="false" />
         </EntityType>
         <EntityType Name="DishOrder">
           <Key>
@@ -28,45 +28,45 @@
           </Key>
           <Property Name="OrderID" Type="int" Nullable="false" />
           <Property Name="DishID" Type="int" Nullable="false" />
-          <Property Name="Count" Type="int" />
+          <Property Name="Count" Type="int" Nullable="false" />
         </EntityType>
         <EntityType Name="Employee">
           <Key>
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="LastName" Type="nvarchar" MaxLength="50" />
-          <Property Name="FirstName" Type="nvarchar" MaxLength="50" />
+          <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="FirstName" Type="nvarchar" MaxLength="50" Nullable="false" />
           <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
-          <Property Name="PostitonID" Type="int" />
-          <Property Name="Login" Type="nvarchar" MaxLength="50" />
-          <Property Name="Password" Type="nvarchar" MaxLength="50" />
-          <Property Name="StatusID" Type="int" />
+          <Property Name="PositionID" Type="int" Nullable="false" />
+          <Property Name="Login" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="StatusID" Type="int" Nullable="false" />
         </EntityType>
         <EntityType Name="Order">
           <Key>
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="CookStatusID" Type="int" />
-          <Property Name="PayStatysID" Type="int" />
-          <Property Name="EmployeeID" Type="int" />
-          <Property Name="TableNumber" Type="int" />
-          <Property Name="ClientCount" Type="int" />
+          <Property Name="CookStatusID" Type="int" Nullable="false" />
+          <Property Name="PayStatysID" Type="int" Nullable="false" />
+          <Property Name="EmployeeID" Type="int" Nullable="false" />
+          <Property Name="TableNumber" Type="int" Nullable="false" />
+          <Property Name="ClientCount" Type="int" Nullable="false" />
         </EntityType>
         <EntityType Name="PayStatus">
           <Key>
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Title" Type="nvarchar" MaxLength="50" />
+          <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
         </EntityType>
         <EntityType Name="Position">
           <Key>
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Title" Type="nvarchar" MaxLength="50" />
+          <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
         </EntityType>
         <EntityType Name="Shift">
           <Key>
@@ -81,7 +81,7 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="Title" Type="nvarchar" MaxLength="50" />
+          <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
         </EntityType>
         <Association Name="FK_DishOrder_Dish">
           <End Role="Dish" Type="Self.Dish" Multiplicity="1">
@@ -112,7 +112,7 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Employee_Position">
-          <End Role="Position" Type="Self.Position" Multiplicity="0..1">
+          <End Role="Position" Type="Self.Position" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -121,12 +121,12 @@
               <PropertyRef Name="ID" />
             </Principal>
             <Dependent Role="Employee">
-              <PropertyRef Name="PostitonID" />
+              <PropertyRef Name="PositionID" />
             </Dependent>
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Employee_Status">
-          <End Role="Status" Type="Self.Status" Multiplicity="0..1">
+          <End Role="Status" Type="Self.Status" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -140,7 +140,7 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Order_CookStatus">
-          <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="0..1">
+          <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -154,7 +154,7 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Order_Employee">
-          <End Role="Employee" Type="Self.Employee" Multiplicity="0..1">
+          <End Role="Employee" Type="Self.Employee" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -168,7 +168,7 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Order_PayStatus">
-          <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="0..1">
+          <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -248,7 +248,7 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
           <NavigationProperty Name="Order" Relationship="Self.FK_Order_CookStatus" FromRole="CookStatus" ToRole="Order" />
         </EntityType>
         <EntityType Name="Dish">
@@ -256,9 +256,9 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-          <Property Name="Cost" Type="Double" />
-          <Property Name="CookTime" Type="Int32" />
+          <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="DishOrder" Relationship="Self.FK_DishOrder_Dish" FromRole="Dish" ToRole="DishOrder" />
         </EntityType>
         <EntityType Name="DishOrder">
@@ -268,7 +268,7 @@
           </Key>
           <Property Name="OrderID" Type="Int32" Nullable="false" />
           <Property Name="DishID" Type="Int32" Nullable="false" />
-          <Property Name="Count" Type="Int32" />
+          <Property Name="Count" Type="Int32" Nullable="false" />
           <NavigationProperty Name="Dish" Relationship="Self.FK_DishOrder_Dish" FromRole="DishOrder" ToRole="Dish" />
           <NavigationProperty Name="Order" Relationship="Self.FK_DishOrder_Order" FromRole="DishOrder" ToRole="Order" />
         </EntityType>
@@ -277,13 +277,13 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-          <Property Name="FirstName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="FirstName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
           <Property Name="MiddleName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-          <Property Name="PostitonID" Type="Int32" />
-          <Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-          <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-          <Property Name="StatusID" Type="Int32" />
+          <Property Name="PositionID" Type="Int32" Nullable="false" />
+          <Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="StatusID" Type="Int32" Nullable="false" />
           <NavigationProperty Name="Position" Relationship="Self.FK_Employee_Position" FromRole="Employee" ToRole="Position" />
           <NavigationProperty Name="Status" Relationship="Self.FK_Employee_Status" FromRole="Employee" ToRole="Status" />
           <NavigationProperty Name="Order" Relationship="Self.FK_Order_Employee" FromRole="Employee" ToRole="Order" />
@@ -294,11 +294,11 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="CookStatusID" Type="Int32" />
-          <Property Name="PayStatysID" Type="Int32" />
-          <Property Name="EmployeeID" Type="Int32" />
-          <Property Name="TableNumber" Type="Int32" />
-          <Property Name="ClientCount" Type="Int32" />
+          <Property Name="CookStatusID" Type="Int32" Nullable="false" />
+          <Property Name="PayStatysID" Type="Int32" Nullable="false" />
+          <Property Name="EmployeeID" Type="Int32" Nullable="false" />
+          <Property Name="TableNumber" Type="Int32" Nullable="false" />
+          <Property Name="ClientCount" Type="Int32" Nullable="false" />
           <NavigationProperty Name="CookStatus" Relationship="Self.FK_Order_CookStatus" FromRole="Order" ToRole="CookStatus" />
           <NavigationProperty Name="DishOrder" Relationship="Self.FK_DishOrder_Order" FromRole="Order" ToRole="DishOrder" />
           <NavigationProperty Name="Employee" Relationship="Self.FK_Order_Employee" FromRole="Order" ToRole="Employee" />
@@ -309,7 +309,7 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
           <NavigationProperty Name="Order" Relationship="Self.FK_Order_PayStatus" FromRole="PayStatus" ToRole="Order" />
         </EntityType>
         <EntityType Name="Position">
@@ -317,7 +317,7 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
           <NavigationProperty Name="Employee" Relationship="Self.FK_Employee_Position" FromRole="Position" ToRole="Employee" />
         </EntityType>
         <EntityType Name="Shift">
@@ -334,11 +334,11 @@
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
           <NavigationProperty Name="Employee" Relationship="Self.FK_Employee_Status" FromRole="Status" ToRole="Employee" />
         </EntityType>
         <Association Name="FK_Order_CookStatus">
-          <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="0..1">
+          <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -380,7 +380,7 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Employee_Position">
-          <End Role="Position" Type="Self.Position" Multiplicity="0..1">
+          <End Role="Position" Type="Self.Position" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -389,12 +389,12 @@
               <PropertyRef Name="ID" />
             </Principal>
             <Dependent Role="Employee">
-              <PropertyRef Name="PostitonID" />
+              <PropertyRef Name="PositionID" />
             </Dependent>
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Employee_Status">
-          <End Role="Status" Type="Self.Status" Multiplicity="0..1">
+          <End Role="Status" Type="Self.Status" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -408,7 +408,7 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Order_Employee">
-          <End Role="Employee" Type="Self.Employee" Multiplicity="0..1">
+          <End Role="Employee" Type="Self.Employee" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -436,7 +436,7 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Order_PayStatus">
-          <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="0..1">
+          <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="1">
             <OnDelete Action="Cascade" />
           </End>
           <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -449,7 +449,7 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <EntityContainer Name="Kafe2Entities1" annotation:LazyLoadingEnabled="true">
+        <EntityContainer Name="Kafe2Entities" annotation:LazyLoadingEnabled="true">
           <EntitySet Name="CookStatus" EntityType="Self.CookStatus" />
           <EntitySet Name="Dish" EntityType="Self.Dish" />
           <EntitySet Name="DishOrder" EntityType="Self.DishOrder" />
@@ -497,7 +497,7 @@
     <!-- C-S mapping content -->
     <edmx:Mappings>
       <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
-        <EntityContainerMapping StorageEntityContainer="Хранилище Kafe2ModelContainer" CdmEntityContainer="Kafe2Entities1">
+        <EntityContainerMapping StorageEntityContainer="Хранилище Kafe2ModelContainer" CdmEntityContainer="Kafe2Entities">
           <EntitySetMapping Name="CookStatus">
             <EntityTypeMapping TypeName="Kafe2Model.CookStatus">
               <MappingFragment StoreEntitySet="CookStatus">
@@ -532,7 +532,7 @@
                 <ScalarProperty Name="LastName" ColumnName="LastName" />
                 <ScalarProperty Name="FirstName" ColumnName="FirstName" />
                 <ScalarProperty Name="MiddleName" ColumnName="MiddleName" />
-                <ScalarProperty Name="PostitonID" ColumnName="PostitonID" />
+                <ScalarProperty Name="PositionID" ColumnName="PositionID" />
                 <ScalarProperty Name="Login" ColumnName="Login" />
                 <ScalarProperty Name="Password" ColumnName="Password" />
                 <ScalarProperty Name="StatusID" ColumnName="StatusID" />

+ 1 - 1
Kafe/Kafe/Model.edmx.diagram

@@ -4,7 +4,7 @@
   <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
-      <Diagram DiagramId="4309ac5c1ab9430f82a5790ab81d2cdd" Name="Diagram1">
+      <Diagram DiagramId="3dae5d878dfa42eda4f04c4aa5d26afd" Name="Diagram1">
         <EntityTypeShape EntityType="Kafe2Model.CookStatus" Width="1.5" PointX="3" PointY="7.625" IsExpanded="true" />
         <EntityTypeShape EntityType="Kafe2Model.Dish" Width="1.5" PointX="5.25" PointY="10.5" IsExpanded="true" />
         <EntityTypeShape EntityType="Kafe2Model.DishOrder" Width="1.5" PointX="7.5" PointY="3.5" IsExpanded="true" />

+ 5 - 5
Kafe/Kafe/Order.cs

@@ -21,11 +21,11 @@ namespace Kafe
         }
     
         public int ID { get; set; }
-        public Nullable<int> CookStatusID { get; set; }
-        public Nullable<int> PayStatysID { get; set; }
-        public Nullable<int> EmployeeID { get; set; }
-        public Nullable<int> TableNumber { get; set; }
-        public Nullable<int> ClientCount { get; set; }
+        public int CookStatusID { get; set; }
+        public int PayStatysID { get; set; }
+        public int EmployeeID { get; set; }
+        public int TableNumber { get; set; }
+        public int ClientCount { get; set; }
     
         public virtual CookStatus CookStatus { get; set; }
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]

+ 5 - 1
Kafe/Kafe/Windows/AdminWindow.xaml

@@ -7,6 +7,10 @@
         mc:Ignorable="d"
         Title="Администратор" Height="450" Width="800" WindowStartupLocation="CenterScreen" 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="Shift" 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 ShiftWindow().Show();
+            this.Close();
+        }
+
     }
 }

+ 33 - 1
Kafe/Kafe/Windows/EmployeeWindow.xaml

@@ -7,6 +7,38 @@
         mc:Ignorable="d"
         Title="Сотрудник" Height="450" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
     <Grid>
-        
+        <ListView Name="EmployeeList" HorizontalContentAlignment="Stretch" SelectionChanged="EmployeeList_SelectionChanged">
+            <ListView.ItemTemplate>
+                <DataTemplate>
+                    <Border BorderThickness="1" BorderBrush="Black">
+                        <Grid>
+                            <Grid.RowDefinitions>
+                                <RowDefinition Height="auto"/>
+                                <RowDefinition Height="auto"/>
+                                <RowDefinition Height="auto"/>
+                            </Grid.RowDefinitions>
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                            </Grid.ColumnDefinitions>
+
+                            <TextBlock Text="{Binding Position.Title, StringFormat=Должность: {0}}"/>
+
+                            <TextBlock  Grid.Row="2">
+                                <TextBlock.Text>
+                                    <MultiBinding StringFormat="{}{0} {1} {2}">
+                                        <Binding Path="LastName"/>
+                                        <Binding Path="FirstName"/>
+                                        <Binding Path="MiddleName"/>
+                                    </MultiBinding>
+                                </TextBlock.Text>
+                            </TextBlock>
+
+                            <TextBlock Grid.Column="1" Text="{Binding Status.Title, StringFormat= Статус: {0}}"/>
+                        </Grid>
+                    </Border>
+                </DataTemplate>
+            </ListView.ItemTemplate>
+        </ListView>
     </Grid>
 </Window>

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

@@ -22,6 +22,17 @@ namespace Kafe.Windows
         public EmployeeWindow()
         {
             InitializeComponent();
+            LoadData();
+        }
+
+        private void LoadData()
+        {
+            EmployeeList.ItemsSource = Helper.GetContext().Employee.ToList();
+        }
+
+        private void EmployeeList_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+
         }
     }
 }

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


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

@@ -8,9 +8,7 @@
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
   </startup>
   <connectionStrings>
-    <add name="Kafe2Entities" 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=Kafe2;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
-    <add name="Kafe2Entities1" 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=Kafe2;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
-  </connectionStrings>
+  <add name="Kafe2Entities" 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=Kafe2;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
   <entityFramework>
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
       <parameters>

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


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

@@ -1 +1 @@
-f5c0b169143b1f2eb1052299755a6453a9a4e8bd
+8597fbd35eb0a5d7c4ce5af9599581d81507aaab

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

@@ -27,3 +27,9 @@ 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\EmployeeWindow.g.cs
+Z:\git\Kafe\Kafe\obj\Debug\Windows\OrderWindow.g.cs
+Z:\git\Kafe\Kafe\obj\Debug\Windows\ShiftWindow.g.cs
+Z:\git\Kafe\Kafe\obj\Debug\Windows\EmployeeWindow.baml
+Z:\git\Kafe\Kafe\obj\Debug\Windows\OrderWindow.baml
+Z:\git\Kafe\Kafe\obj\Debug\Windows\ShiftWindow.baml

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


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


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
+71000609079
 22035508349
-21-674748604
+24-2049304479
 18-1273807529
-MainWindow.xaml;Windows\AdminWindow.xaml;Windows\CookerWindow.xaml;Windows\WaiterWindow.xaml;
+MainWindow.xaml;Windows\AdminWindow.xaml;Windows\CookerWindow.xaml;Windows\EmployeeWindow.xaml;Windows\OrderWindow.xaml;Windows\ShiftWindow.xaml;Windows\WaiterWindow.xaml;
 
 False
 

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

@@ -16,5 +16,5 @@ Z:\git\Kafe\Kafe\App.xaml
 18-1273807529
 MainWindow.xaml;Windows\AdminWindow.xaml;Windows\CookerWindow.xaml;Windows\EmployeeWindow.xaml;Windows\OrderWindow.xaml;Windows\ShiftWindow.xaml;Windows\WaiterWindow.xaml;
 
-True
+False
 

+ 0 - 4
Kafe/Kafe/obj/Debug/Kafe_MarkupCompile.i.lref

@@ -1,4 +0,0 @@
-
-
-FZ:\git\Kafe\Kafe\Windows\ShiftWindow.xaml;;
-

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

@@ -4,4 +4,7 @@ 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\EmployeeWindow.xaml;;
+FZ:\git\Kafe\Kafe\Windows\OrderWindow.xaml;;
+FZ:\git\Kafe\Kafe\Windows\ShiftWindow.xaml;;
 

BIN
Kafe/Kafe/obj/Debug/MainWindow.baml


+ 1 - 1
Kafe/Kafe/obj/Debug/MainWindow.g.cs

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

+ 1 - 1
Kafe/Kafe/obj/Debug/MainWindow.g.i.cs

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

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


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


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}" "6C2B6B2E26156138E978AAFA2687B081990C94811E978741F0C63CE9E857FEDF"
+#pragma checksum "..\..\..\Windows\AdminWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6CDA8862BC9BB8F7879FBEEDC5CFC78636916F3B014D8A37DE3E9A0D9859B941"
 //------------------------------------------------------------------------------
 // <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 Shift;
+        
+        #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.Shift = ((System.Windows.Controls.Button)(target));
+            
+            #line 13 "..\..\..\Windows\AdminWindow.xaml"
+            this.Shift.Click += new System.Windows.RoutedEventHandler(this.DishesBtn_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}" "6C2B6B2E26156138E978AAFA2687B081990C94811E978741F0C63CE9E857FEDF"
+#pragma checksum "..\..\..\Windows\AdminWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6CDA8862BC9BB8F7879FBEEDC5CFC78636916F3B014D8A37DE3E9A0D9859B941"
 //------------------------------------------------------------------------------
 // <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 Shift;
+        
+        #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.Shift = ((System.Windows.Controls.Button)(target));
+            
+            #line 13 "..\..\..\Windows\AdminWindow.xaml"
+            this.Shift.Click += new System.Windows.RoutedEventHandler(this.DishesBtn_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
             this._contentLoaded = true;
         }
     }

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}" "B05552E7A309CBEBA9F21679802036279ECE7A0745464177E958C3EE7F88262F"
+#pragma checksum "..\..\..\Windows\CookerWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "ADEBA46DE6F6CA9812D07AE1AF41B01F798B0F2DB1472126E3E8A83E880EBA71"
 //------------------------------------------------------------------------------
 // <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}" "B05552E7A309CBEBA9F21679802036279ECE7A0745464177E958C3EE7F88262F"
+#pragma checksum "..\..\..\Windows\CookerWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "ADEBA46DE6F6CA9812D07AE1AF41B01F798B0F2DB1472126E3E8A83E880EBA71"
 //------------------------------------------------------------------------------
 // <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;
+        }
+    }
+}
+

BIN
Kafe/Kafe/obj/Debug/Windows/EmployeeWindow.baml


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

@@ -0,0 +1,95 @@
+#pragma checksum "..\..\..\Windows\EmployeeWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "519599C16067BD5523948FBDC70A0D299E67D3ED3E711163E05C060350AE1515"
+//------------------------------------------------------------------------------
+// <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 {
+        
+        
+        #line 10 "..\..\..\Windows\EmployeeWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ListView EmployeeList;
+        
+        #line default
+        #line hidden
+        
+        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) {
+            switch (connectionId)
+            {
+            case 1:
+            this.EmployeeList = ((System.Windows.Controls.ListView)(target));
+            
+            #line 10 "..\..\..\Windows\EmployeeWindow.xaml"
+            this.EmployeeList.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.EmployeeList_SelectionChanged);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

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

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\..\Windows\EmployeeWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "795A18820ED247001A6EB298CF2E51047C96E173ADDD6AC61879422FE527BD22"
+#pragma checksum "..\..\..\Windows\EmployeeWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "519599C16067BD5523948FBDC70A0D299E67D3ED3E711163E05C060350AE1515"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -40,6 +40,14 @@ namespace Kafe.Windows {
     /// </summary>
     public partial class EmployeeWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
+        
+        #line 10 "..\..\..\Windows\EmployeeWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ListView EmployeeList;
+        
+        #line default
+        #line hidden
+        
         private bool _contentLoaded;
         
         /// <summary>
@@ -68,6 +76,18 @@ 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.EmployeeList = ((System.Windows.Controls.ListView)(target));
+            
+            #line 10 "..\..\..\Windows\EmployeeWindow.xaml"
+            this.EmployeeList.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.EmployeeList_SelectionChanged);
+            
+            #line default
+            #line hidden
+            return;
+            }
             this._contentLoaded = true;
         }
     }

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}" "F98B79AAE04AFA8AFC41F861143CBFC9D62127301063336080F51AF21788EA7E"
+//------------------------------------------------------------------------------
+// <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;
+        }
+    }
+}
+

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

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

BIN
Kafe/Kafe/obj/Debug/Windows/ShiftWindow.baml


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

@@ -0,0 +1,75 @@
+#pragma checksum "..\..\..\Windows\ShiftWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "9195F49D327C5DD57A927F74EF0D98EFAF358FF62C270C12CE961CC95B7927AC"
+//------------------------------------------------------------------------------
+// <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>
+    /// ShiftWindow
+    /// </summary>
+    public partial class ShiftWindow : 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/shiftwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\..\Windows\ShiftWindow.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;
+        }
+    }
+}
+

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

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

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}" "BCA8ADF5FCB7D7647C948D6B356EBEC1827CC3650CA68BA51145C310CC32DA69"
+#pragma checksum "..\..\..\Windows\WaiterWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "00490CA22458538817F55CFD1DE30176AB3253E30244C290870DE8E9FA02A99E"
 //------------------------------------------------------------------------------
 // <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}" "BCA8ADF5FCB7D7647C948D6B356EBEC1827CC3650CA68BA51145C310CC32DA69"
+#pragma checksum "..\..\..\Windows\WaiterWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "00490CA22458538817F55CFD1DE30176AB3253E30244C290870DE8E9FA02A99E"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.

+ 26 - 26
Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.csdl

@@ -5,7 +5,7 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
     <NavigationProperty Name="Order" Relationship="Self.FK_Order_CookStatus" FromRole="CookStatus" ToRole="Order" />
   </EntityType>
   <EntityType Name="Dish">
@@ -13,9 +13,9 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="Cost" Type="Double" />
-    <Property Name="CookTime" Type="Int32" />
+    <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="DishOrder" Relationship="Self.FK_DishOrder_Dish" FromRole="Dish" ToRole="DishOrder" />
   </EntityType>
   <EntityType Name="DishOrder">
@@ -25,7 +25,7 @@
     </Key>
     <Property Name="OrderID" Type="Int32" Nullable="false" />
     <Property Name="DishID" Type="Int32" Nullable="false" />
-    <Property Name="Count" Type="Int32" />
+    <Property Name="Count" Type="Int32" Nullable="false" />
     <NavigationProperty Name="Dish" Relationship="Self.FK_DishOrder_Dish" FromRole="DishOrder" ToRole="Dish" />
     <NavigationProperty Name="Order" Relationship="Self.FK_DishOrder_Order" FromRole="DishOrder" ToRole="Order" />
   </EntityType>
@@ -34,13 +34,13 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="FirstName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="FirstName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
     <Property Name="MiddleName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="PostitonID" Type="Int32" />
-    <Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="StatusID" Type="Int32" />
+    <Property Name="PositionID" Type="Int32" Nullable="false" />
+    <Property Name="Login" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="StatusID" Type="Int32" Nullable="false" />
     <NavigationProperty Name="Position" Relationship="Self.FK_Employee_Position" FromRole="Employee" ToRole="Position" />
     <NavigationProperty Name="Status" Relationship="Self.FK_Employee_Status" FromRole="Employee" ToRole="Status" />
     <NavigationProperty Name="Order" Relationship="Self.FK_Order_Employee" FromRole="Employee" ToRole="Order" />
@@ -51,11 +51,11 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="CookStatusID" Type="Int32" />
-    <Property Name="PayStatysID" Type="Int32" />
-    <Property Name="EmployeeID" Type="Int32" />
-    <Property Name="TableNumber" Type="Int32" />
-    <Property Name="ClientCount" Type="Int32" />
+    <Property Name="CookStatusID" Type="Int32" Nullable="false" />
+    <Property Name="PayStatysID" Type="Int32" Nullable="false" />
+    <Property Name="EmployeeID" Type="Int32" Nullable="false" />
+    <Property Name="TableNumber" Type="Int32" Nullable="false" />
+    <Property Name="ClientCount" Type="Int32" Nullable="false" />
     <NavigationProperty Name="CookStatus" Relationship="Self.FK_Order_CookStatus" FromRole="Order" ToRole="CookStatus" />
     <NavigationProperty Name="DishOrder" Relationship="Self.FK_DishOrder_Order" FromRole="Order" ToRole="DishOrder" />
     <NavigationProperty Name="Employee" Relationship="Self.FK_Order_Employee" FromRole="Order" ToRole="Employee" />
@@ -66,7 +66,7 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
     <NavigationProperty Name="Order" Relationship="Self.FK_Order_PayStatus" FromRole="PayStatus" ToRole="Order" />
   </EntityType>
   <EntityType Name="Position">
@@ -74,7 +74,7 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
     <NavigationProperty Name="Employee" Relationship="Self.FK_Employee_Position" FromRole="Position" ToRole="Employee" />
   </EntityType>
   <EntityType Name="Shift">
@@ -91,11 +91,11 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
     <NavigationProperty Name="Employee" Relationship="Self.FK_Employee_Status" FromRole="Status" ToRole="Employee" />
   </EntityType>
   <Association Name="FK_Order_CookStatus">
-    <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="0..1">
+    <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -137,7 +137,7 @@
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Employee_Position">
-    <End Role="Position" Type="Self.Position" Multiplicity="0..1">
+    <End Role="Position" Type="Self.Position" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -146,12 +146,12 @@
         <PropertyRef Name="ID" />
       </Principal>
       <Dependent Role="Employee">
-        <PropertyRef Name="PostitonID" />
+        <PropertyRef Name="PositionID" />
       </Dependent>
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Employee_Status">
-    <End Role="Status" Type="Self.Status" Multiplicity="0..1">
+    <End Role="Status" Type="Self.Status" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -165,7 +165,7 @@
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Order_Employee">
-    <End Role="Employee" Type="Self.Employee" Multiplicity="0..1">
+    <End Role="Employee" Type="Self.Employee" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -193,7 +193,7 @@
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Order_PayStatus">
-    <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="0..1">
+    <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -206,7 +206,7 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
-  <EntityContainer Name="Kafe2Entities1" annotation:LazyLoadingEnabled="true">
+  <EntityContainer Name="Kafe2Entities" annotation:LazyLoadingEnabled="true">
     <EntitySet Name="CookStatus" EntityType="Self.CookStatus" />
     <EntitySet Name="Dish" EntityType="Self.Dish" />
     <EntitySet Name="DishOrder" EntityType="Self.DishOrder" />

+ 2 - 2
Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.msl

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
-  <EntityContainerMapping StorageEntityContainer="Хранилище Kafe2ModelContainer" CdmEntityContainer="Kafe2Entities1">
+  <EntityContainerMapping StorageEntityContainer="Хранилище Kafe2ModelContainer" CdmEntityContainer="Kafe2Entities">
     <EntitySetMapping Name="CookStatus">
       <EntityTypeMapping TypeName="Kafe2Model.CookStatus">
         <MappingFragment StoreEntitySet="CookStatus">
@@ -35,7 +35,7 @@
           <ScalarProperty Name="LastName" ColumnName="LastName" />
           <ScalarProperty Name="FirstName" ColumnName="FirstName" />
           <ScalarProperty Name="MiddleName" ColumnName="MiddleName" />
-          <ScalarProperty Name="PostitonID" ColumnName="PostitonID" />
+          <ScalarProperty Name="PositionID" ColumnName="PositionID" />
           <ScalarProperty Name="Login" ColumnName="Login" />
           <ScalarProperty Name="Password" ColumnName="Password" />
           <ScalarProperty Name="StatusID" ColumnName="StatusID" />

+ 25 - 25
Kafe/Kafe/obj/Debug/edmxResourcesToEmbed/Model.ssdl

@@ -5,16 +5,16 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="Title" Type="nvarchar" MaxLength="50" />
+    <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
   </EntityType>
   <EntityType Name="Dish">
     <Key>
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="Title" Type="nvarchar" MaxLength="50" />
-    <Property Name="Cost" Type="float" />
-    <Property Name="CookTime" Type="int" />
+    <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
+    <Property Name="Cost" Type="float" Nullable="false" />
+    <Property Name="CookTime" Type="int" Nullable="false" />
   </EntityType>
   <EntityType Name="DishOrder">
     <Key>
@@ -23,45 +23,45 @@
     </Key>
     <Property Name="OrderID" Type="int" Nullable="false" />
     <Property Name="DishID" Type="int" Nullable="false" />
-    <Property Name="Count" Type="int" />
+    <Property Name="Count" Type="int" Nullable="false" />
   </EntityType>
   <EntityType Name="Employee">
     <Key>
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="LastName" Type="nvarchar" MaxLength="50" />
-    <Property Name="FirstName" Type="nvarchar" MaxLength="50" />
+    <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
+    <Property Name="FirstName" Type="nvarchar" MaxLength="50" Nullable="false" />
     <Property Name="MiddleName" Type="nvarchar" MaxLength="50" />
-    <Property Name="PostitonID" Type="int" />
-    <Property Name="Login" Type="nvarchar" MaxLength="50" />
-    <Property Name="Password" Type="nvarchar" MaxLength="50" />
-    <Property Name="StatusID" Type="int" />
+    <Property Name="PositionID" Type="int" Nullable="false" />
+    <Property Name="Login" Type="nvarchar" MaxLength="50" Nullable="false" />
+    <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
+    <Property Name="StatusID" Type="int" Nullable="false" />
   </EntityType>
   <EntityType Name="Order">
     <Key>
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="CookStatusID" Type="int" />
-    <Property Name="PayStatysID" Type="int" />
-    <Property Name="EmployeeID" Type="int" />
-    <Property Name="TableNumber" Type="int" />
-    <Property Name="ClientCount" Type="int" />
+    <Property Name="CookStatusID" Type="int" Nullable="false" />
+    <Property Name="PayStatysID" Type="int" Nullable="false" />
+    <Property Name="EmployeeID" Type="int" Nullable="false" />
+    <Property Name="TableNumber" Type="int" Nullable="false" />
+    <Property Name="ClientCount" Type="int" Nullable="false" />
   </EntityType>
   <EntityType Name="PayStatus">
     <Key>
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="Title" Type="nvarchar" MaxLength="50" />
+    <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
   </EntityType>
   <EntityType Name="Position">
     <Key>
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="Title" Type="nvarchar" MaxLength="50" />
+    <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
   </EntityType>
   <EntityType Name="Shift">
     <Key>
@@ -76,7 +76,7 @@
       <PropertyRef Name="ID" />
     </Key>
     <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="Title" Type="nvarchar" MaxLength="50" />
+    <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
   </EntityType>
   <Association Name="FK_DishOrder_Dish">
     <End Role="Dish" Type="Self.Dish" Multiplicity="1">
@@ -107,7 +107,7 @@
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Employee_Position">
-    <End Role="Position" Type="Self.Position" Multiplicity="0..1">
+    <End Role="Position" Type="Self.Position" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -116,12 +116,12 @@
         <PropertyRef Name="ID" />
       </Principal>
       <Dependent Role="Employee">
-        <PropertyRef Name="PostitonID" />
+        <PropertyRef Name="PositionID" />
       </Dependent>
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Employee_Status">
-    <End Role="Status" Type="Self.Status" Multiplicity="0..1">
+    <End Role="Status" Type="Self.Status" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -135,7 +135,7 @@
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Order_CookStatus">
-    <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="0..1">
+    <End Role="CookStatus" Type="Self.CookStatus" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -149,7 +149,7 @@
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Order_Employee">
-    <End Role="Employee" Type="Self.Employee" Multiplicity="0..1">
+    <End Role="Employee" Type="Self.Employee" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Order" Type="Self.Order" Multiplicity="*" />
@@ -163,7 +163,7 @@
     </ReferentialConstraint>
   </Association>
   <Association Name="FK_Order_PayStatus">
-    <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="0..1">
+    <End Role="PayStatus" Type="Self.PayStatus" Multiplicity="1">
       <OnDelete Action="Cascade" />
     </End>
     <End Role="Order" Type="Self.Order" Multiplicity="*" />

BIN
NEW DB.vsdx