Browse Source

Вывод данных о продуктах и локальное создание заказов

gr672_pgv 4 years ago
parent
commit
a9d5e8d4af
100 changed files with 1465 additions and 56510 deletions
  1. BIN
      .vs/StoreAllProject/v16/.suo
  2. 21 0
      Cashier/Cashier.csproj
  3. 22 0
      Cashier/EnabledCashierWindow.xaml
  4. 42 0
      Cashier/EnabledCashierWindow.xaml.cs
  5. 8 1
      Cashier/Helper.cs
  6. 11 1
      Cashier/MainWindow.xaml
  7. 75 1
      Cashier/MainWindow.xaml.cs
  8. 118 0
      Cashier/MenuPage.xaml
  9. 129 0
      Cashier/MenuPage.xaml.cs
  10. 15 0
      Cashier/RootDataOfOrder.cs
  11. 22 0
      Cashier/RootDataOfProductInOrder.cs
  12. 3 3
      CentralServer/RootDataOfProductInStore.cs
  13. 19 4
      Cashier/StartWorkPage.xaml.cs
  14. BIN
      Cashier/bin/Debug/Cashier.exe
  15. BIN
      Cashier/bin/Debug/Cashier.pdb
  16. 0 0
      Cashier/bin/Debug/Newtonsoft.Json.dll
  17. 0 0
      Cashier/bin/Debug/Newtonsoft.Json.xml
  18. BIN
      Cashier/obj/Debug/App.baml
  19. 0 0
      Cashier/obj/Debug/Cashier.csproj.CopyComplete
  20. 1 1
      Cashier/obj/Debug/Cashier.csproj.CoreCompileInputs.cache
  21. 7 0
      Cashier/obj/Debug/Cashier.csproj.FileListAbsolute.txt
  22. BIN
      Cashier/obj/Debug/Cashier.csprojAssemblyReference.cache
  23. BIN
      Cashier/obj/Debug/Cashier.exe
  24. BIN
      Cashier/obj/Debug/Cashier.g.resources
  25. BIN
      Cashier/obj/Debug/Cashier.pdb
  26. 4 4
      Cashier/obj/Debug/Cashier_MarkupCompile.cache
  27. 5 5
      Cashier/obj/Debug/Cashier_MarkupCompile.i.cache
  28. 0 4
      Cashier/obj/Debug/Cashier_MarkupCompile.i.lref
  29. 2 0
      Cashier/obj/Debug/Cashier_MarkupCompile.lref
  30. BIN
      Cashier/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  31. BIN
      Cashier/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  32. BIN
      Cashier/obj/Debug/EnabledCashierWindow.baml
  33. 106 0
      Cashier/obj/Debug/EnabledCashierWindow.g.cs
  34. 106 0
      Cashier/obj/Debug/EnabledCashierWindow.g.i.cs
  35. BIN
      Cashier/obj/Debug/MainWindow.baml
  36. 42 8
      Cashier/obj/Debug/MainWindow.g.cs
  37. 42 8
      Cashier/obj/Debug/MainWindow.g.i.cs
  38. BIN
      Cashier/obj/Debug/MenuPage.baml
  39. 220 0
      Cashier/obj/Debug/MenuPage.g.cs
  40. 226 0
      Cashier/obj/Debug/MenuPage.g.i.cs
  41. BIN
      Cashier/obj/Debug/StartWorkPage.baml
  42. BIN
      Cashier/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
  43. 0 1
      CentralServer/packages.config
  44. 0 23
      CentralServer/App.config
  45. 0 74
      CentralServer/CentralServer.csproj
  46. 0 81
      CentralServer/Program.cs
  47. 0 36
      CentralServer/Properties/AssemblyInfo.cs
  48. 0 13
      CentralServer/RootDataOfCashier.cs
  49. 0 17
      CentralServer/RootDataOfEmployee.cs
  50. 0 16
      CentralServer/RootDataOfStore.cs
  51. 0 16
      CentralServer/RootDataOfWorkShift.cs
  52. BIN
      CentralServer/bin/Debug/CentralServer.exe
  53. 0 23
      CentralServer/bin/Debug/CentralServer.exe.config
  54. BIN
      CentralServer/bin/Debug/CentralServer.pdb
  55. BIN
      CentralServer/bin/Debug/EntityFramework.SqlServer.dll
  56. 0 2093
      CentralServer/bin/Debug/EntityFramework.SqlServer.xml
  57. BIN
      CentralServer/bin/Debug/EntityFramework.dll
  58. 0 53236
      CentralServer/bin/Debug/EntityFramework.xml
  59. 0 4
      CentralServer/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
  60. 0 1
      CentralServer/obj/Debug/CentralServer.csproj.CoreCompileInputs.cache
  61. 0 14
      CentralServer/obj/Debug/CentralServer.csproj.FileListAbsolute.txt
  62. BIN
      CentralServer/obj/Debug/CentralServer.csprojAssemblyReference.cache
  63. BIN
      CentralServer/obj/Debug/CentralServer.exe
  64. BIN
      CentralServer/obj/Debug/CentralServer.pdb
  65. BIN
      CentralServer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  66. 0 0
      CentralServer/obj/Debug/TempPE/StoreModel.Context.cs.dll
  67. BIN
      CentralServer/obj/Debug/TempPE/StoreModel.Designer.cs.dll
  68. BIN
      CentralServer/obj/Debug/TempPE/StoreModel.cs.dll
  69. 0 319
      CentralServer/obj/Debug/edmxResourcesToEmbed/StoreModel.csdl
  70. 0 101
      CentralServer/obj/Debug/edmxResourcesToEmbed/StoreModel.msl
  71. 0 262
      CentralServer/obj/Debug/edmxResourcesToEmbed/StoreModel.ssdl
  72. 1 1
      StoreServer/EmployeePartial.cs
  73. 1 1
      StoreServer/ModelStore.Context.cs
  74. 60 60
      StoreServer/ModelStore.edmx
  75. 3 3
      StoreServer/ModelStore.edmx.diagram
  76. 22 9
      StoreServer/MonitoringCashierPage.xaml
  77. 38 5
      StoreServer/MonitoringCashierPage.xaml.cs
  78. 1 1
      StoreServer/Order.cs
  79. 19 0
      StoreServer/RootDataOfProductInStore.cs
  80. 1 0
      StoreServer/StoreServer.csproj
  81. 2 2
      StoreServer/WorkShift.cs
  82. 12 3
      StoreServer/WorkShiftPartial.cs
  83. BIN
      StoreServer/bin/Debug/StoreServer.exe
  84. BIN
      StoreServer/bin/Debug/StoreServer.pdb
  85. BIN
      StoreServer/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  86. BIN
      StoreServer/obj/Debug/MonitoringCashierPage.baml
  87. 2 2
      StoreServer/obj/Debug/MonitoringCashierPage.g.cs
  88. 2 2
      StoreServer/obj/Debug/MonitoringCashierPage.g.i.cs
  89. 1 1
      StoreServer/obj/Debug/StoreServer.csproj.CoreCompileInputs.cache
  90. BIN
      StoreServer/obj/Debug/StoreServer.csprojAssemblyReference.cache
  91. BIN
      StoreServer/obj/Debug/StoreServer.exe
  92. BIN
      StoreServer/obj/Debug/StoreServer.g.resources
  93. BIN
      StoreServer/obj/Debug/StoreServer.pdb
  94. 1 1
      StoreServer/obj/Debug/StoreServer_MarkupCompile.cache
  95. 2 2
      StoreServer/obj/Debug/StoreServer_MarkupCompile.i.cache
  96. 4 0
      StoreServer/obj/Debug/StoreServer_MarkupCompile.i.lref
  97. BIN
      StoreServer/obj/Debug/TempPE/ModelStore.Designer.cs.dll
  98. BIN
      StoreServer/obj/Debug/TempPE/ModelStore.cs.dll
  99. 47 47
      StoreServer/obj/Debug/edmxResourcesToEmbed/ModelStore.csdl
  100. 0 0
      StoreServer/obj/Debug/edmxResourcesToEmbed/ModelStore.msl

BIN
.vs/StoreAllProject/v16/.suo


+ 21 - 0
Cashier/Cashier.csproj

@@ -35,6 +35,9 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
@@ -55,9 +58,22 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
+    <Compile Include="EnabledCashierWindow.xaml.cs">
+      <DependentUpon>EnabledCashierWindow.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="MenuPage.xaml.cs">
+      <DependentUpon>MenuPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="RootDataOfOrder.cs" />
+    <Compile Include="RootDataOfProductInOrder.cs" />
+    <Compile Include="RootDataOfProductInStore.cs" />
     <Compile Include="StartWorkPage.xaml.cs">
       <DependentUpon>StartWorkPage.xaml</DependentUpon>
     </Compile>
+    <Page Include="EnabledCashierWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -71,6 +87,10 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="MenuPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="StartWorkPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -95,6 +115,7 @@
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     </EmbeddedResource>
+    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>

+ 22 - 0
Cashier/EnabledCashierWindow.xaml

@@ -0,0 +1,22 @@
+<Window x:Class="Cashier.EnabledCashierWindow"
+        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:Cashier"
+        mc:Ignorable="d"
+        Title="Разблокировать" Height="450" Width="800" MaxWidth="800" MaxHeight="450" WindowStartupLocation="CenterScreen" MinHeight="450" MinWidth="800">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition/>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <TextBlock Text="Введите код сотрудника" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="5"></TextBlock>
+        <TextBox Grid.Column="1" Name="TxtNumberEmployee" VerticalAlignment="Bottom" Height="30" Margin="5,0,200,5" VerticalContentAlignment="Center" Padding="5,0,0,0"></TextBox>
+        <Button Grid.Row="1" Name="BtnEnabledCashier" Click="BtnEnabledCashier_Click" Grid.ColumnSpan="2" VerticalAlignment="Top" Height="30" Margin="300,20,300,20">Разблокировать</Button>
+    </Grid>
+</Window>

+ 42 - 0
Cashier/EnabledCashierWindow.xaml.cs

@@ -0,0 +1,42 @@
+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 Cashier
+{
+    /// <summary>
+    /// Interaction logic for EnabledCashierWindow.xaml
+    /// </summary>
+    public partial class EnabledCashierWindow : Window
+    {
+        public EnabledCashierWindow()
+        {
+            InitializeComponent();
+
+        }
+
+        private void BtnEnabledCashier_Click(object sender, RoutedEventArgs e)
+        {
+            if (TxtNumberEmployee.Text == Helper.NumberEmployee)
+            {
+                this.DialogResult = true;
+                this.Close();
+            }
+            else
+            {
+                Helper.ErrorMessage("Не корректный номер");
+                this.DialogResult = false;
+            }
+        }
+    }
+}

+ 8 - 1
Cashier/Helper.cs

@@ -15,7 +15,14 @@ namespace Cashier
         }
         public static void InformationMessage(string message)
         {
-            MessageBox.Show(message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Information);
+            MessageBox.Show(message, "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
         }
+
+        public static int IDStore { get; set; }
+        public static int IDCashier { get; set; }
+        public static string NumberEmployee { get; set; }
+
+        public static int? WorkShiftID { get; set; }
+        public static List<RootDataOfProductInStore> ProductInStore {get;set;}
     }
 }

+ 11 - 1
Cashier/MainWindow.xaml

@@ -11,7 +11,17 @@
             <RowDefinition Height="70"/>
             <RowDefinition/>
         </Grid.RowDefinitions>
-        <Button x:Name="BtnBack" Content="Назад" HorizontalAlignment="Right" VerticalAlignment="Center" Width="100" Click="BtnBack_Click" Visibility="Collapsed" Height="30" Margin="0,0,20,0"></Button>
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <ColumnDefinition/>
+                <ColumnDefinition/>
+            </Grid.ColumnDefinitions>
+            <Button  Name="BtnStartWorkShift" Margin="50,17,50,20" Click="BtnStartWorkShift_Click">Начать смену</Button>
+            <Button  Name="BtnBlockCashier" Grid.Column="1"  Margin="17" Click="BtnBlockCashier_Click">Заблокировать кассу</Button>
+            <Button x:Name="BtnEndWorkShift" IsEnabled="False" Grid.Column="2" Content="Закончить смену"  Click="BtnEndWorkShift_Click"  Margin="47,17,47,17"></Button>
+        </Grid>
+        
         <Frame Grid.Row="1" Name="MainFrame" NavigationUIVisibility="Hidden" ContentRendered="MainFrame_ContentRendered"></Frame>
     </Grid>
 </Window>

+ 75 - 1
Cashier/MainWindow.xaml.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Net;
+using System.Net.Sockets;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
@@ -20,6 +22,7 @@ namespace Cashier
     /// </summary>
     public partial class MainWindow : Window
     {
+        public bool IsEnabledCashier = false;
         public MainWindow()
         {
             InitializeComponent();
@@ -29,12 +32,83 @@ namespace Cashier
 
         private void MainFrame_ContentRendered(object sender, EventArgs e)
         {
-            BtnBack.Visibility = ManagerFrame.MainFrame.CanGoBack ? Visibility.Visible : Visibility.Collapsed;
+            BtnEndWorkShift.Visibility = ManagerFrame.MainFrame.CanGoBack ? Visibility.Visible : Visibility.Collapsed;
+            BtnStartWorkShift.Visibility = ManagerFrame.MainFrame.CanGoBack ? Visibility.Visible : Visibility.Collapsed;
+            BtnBlockCashier.Visibility = ManagerFrame.MainFrame.CanGoBack ? Visibility.Visible : Visibility.Collapsed;
         }
 
         private void BtnBack_Click(object sender, RoutedEventArgs e)
         {
             ManagerFrame.MainFrame.GoBack();
         }
+
+        private void BtnEndWorkShift_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        public async void StartWorkShift(string IDStore, string Message)
+        {
+            try
+            {
+                if (IDStore.Length == 1) IDStore = IDStore.Insert(0, "0");
+                IPEndPoint iPEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), Convert.ToInt32("102" + IDStore));
+                Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                socket.Connect(iPEndPoint);
+                byte[] data = Encoding.UTF8.GetBytes(Message);
+                socket.Send(data);
+                data = new byte[256];
+                int byts = 0;
+                StringBuilder builder = new StringBuilder();
+                do
+                {
+                    byts = socket.Receive(data, data.Length, 0);
+                    builder.Append(Encoding.UTF8.GetString(data, 0, byts));
+                } while (socket.Available > 0);
+                string response = builder.ToString();
+                Helper.WorkShiftID = Convert.ToInt32(response);
+                BtnEndWorkShift.IsEnabled = true;
+                BtnStartWorkShift.IsEnabled = false;
+                socket.Shutdown(SocketShutdown.Both);
+                socket.Close();
+            }
+            catch (Exception)
+            {
+                Helper.ErrorMessage("Нет ответа от сервера");
+            }
+
+        }
+
+
+        private void BtnStartWorkShift_Click(object sender, RoutedEventArgs e)
+        {
+            StartWorkShift(Helper.IDStore.ToString(), $"Start work shift ={Helper.IDCashier}");
+        }
+
+        private void BtnBlockCashier_Click(object sender, RoutedEventArgs e)
+        {
+            if (IsEnabledCashier == false)
+            {
+                BtnBlockCashier.Content = "Разблокировать кассу";
+                MainFrame.IsEnabled = false;
+                BtnStartWorkShift.IsEnabled = false;
+                BtnEndWorkShift.IsEnabled = false;
+                IsEnabledCashier = true;
+                return;
+            }
+            EnabledCashierWindow enabledCashierWindow = new EnabledCashierWindow();
+            if (enabledCashierWindow.ShowDialog()== true)
+            {
+                if (Helper.WorkShiftID == null)
+                {
+                    BtnStartWorkShift.IsEnabled = true;
+                }
+                BtnBlockCashier.Content = "Заблокировать кассу";
+                MainFrame.IsEnabled = true;
+                BtnEndWorkShift.IsEnabled = true;
+                IsEnabledCashier = false;
+            }
+          
+        }
     }
 }

+ 118 - 0
Cashier/MenuPage.xaml

@@ -0,0 +1,118 @@
+<Page x:Class="Cashier.MenuPage"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:Cashier"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="{Binding ElementName=TabCashier, Path=SelectedItem.Header}">
+
+    <Grid>
+        <TabControl x:Name="TabCashier" TabStripPlacement="Left">
+            <TabItem Name="BtnPayment" Header="Продажа">
+                <Grid>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition/>
+                        <ColumnDefinition/>
+                    </Grid.ColumnDefinitions>
+                    <Grid>
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+                        </Grid.ColumnDefinitions>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="2*"/>
+                            <RowDefinition/>
+                            <RowDefinition/>
+                        </Grid.RowDefinitions>
+                        <TextBlock Margin="5" VerticalAlignment="Bottom" HorizontalAlignment="Right">Код продукта</TextBlock>
+                        <TextBox x:Name="TxtProductCode" Grid.Column="1" VerticalContentAlignment="Center" Padding="5,0,0,0" VerticalAlignment="Bottom" Height="30" Margin="5,5,20,5"></TextBox>
+                        <TextBlock Margin="5" VerticalAlignment="Top" HorizontalAlignment="Right" Grid.Row="1">Количество</TextBlock>
+                        <TextBox x:Name="TxtAmountProduct" Grid.Column="1" VerticalAlignment="Top" VerticalContentAlignment="Center" Padding="5,0,0,0" Grid.Row="1" Height="30" Margin="5,5,20,5"></TextBox>
+                        <Button Grid.RowSpan="2" Grid.Row="1" Grid.ColumnSpan="2" Height="30" Margin="100,0,100,0" VerticalAlignment="Center" 
+                                Name="BtnAddInOrder" Click="BtnAddInOrder_Click">Добавить</Button>
+                    </Grid>
+                    <Grid Grid.Column="1">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="Auto"/>
+                            <ColumnDefinition/>
+                        </Grid.ColumnDefinitions>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="7*"/>
+                            <RowDefinition/>
+                            <RowDefinition Height="2*"/>
+                        </Grid.RowDefinitions>
+                        <DataGrid AutoGenerateColumns="False" Name="ProductInOrderList" Margin="5" ColumnWidth="SizeToHeader" Grid.ColumnSpan="2" CanUserAddRows="False">
+                            <DataGrid.Columns>
+                                <DataGridTextColumn Header="Название"  Binding="{Binding ProductInStore.NameProduct}">
+                                    <DataGridTextColumn.ElementStyle>
+                                        <Style TargetType="TextBlock">
+                                            <Setter Property="TextWrapping" Value="Wrap"></Setter>
+                                        </Style>
+                                    </DataGridTextColumn.ElementStyle>
+                                </DataGridTextColumn>
+                                <DataGridTextColumn Header="Кол-во" Binding="{Binding AmountProduct}"></DataGridTextColumn>
+                                <DataGridTextColumn Header="Стоимость" Binding="{Binding Cost, StringFormat={}{0:F2}}"></DataGridTextColumn>
+                                <DataGridTemplateColumn Width="Auto">
+                                    <DataGridTemplateColumn.CellTemplate>
+                                        <DataTemplate>
+                                            <Button x:Name="BtnDeleteInOrder" Click="BtnDeleteInOrder_Click" Width="30" Height="30">X</Button>
+                                        </DataTemplate>
+                                    </DataGridTemplateColumn.CellTemplate>
+                                </DataGridTemplateColumn>
+                            </DataGrid.Columns>
+                        </DataGrid>
+                        <TextBlock Text="Общая стоимость" Grid.Row="1" VerticalAlignment="Center" Margin="5"></TextBlock>
+                        <TextBlock x:Name="TxtTotalCost" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="5"></TextBlock>
+                        <Button x:Name="BtnCreateOrder" Grid.Row="2" Grid.ColumnSpan="2" Height="30" Margin="100,15,100,15" Click="BtnCreateOrder_Click">Оплатить</Button>
+                    </Grid>
+                </Grid>
+            </TabItem>
+            <TabItem Header="Товары">
+                <Grid>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="50"/>
+                        <RowDefinition/>
+                    </Grid.RowDefinitions>
+                    <Grid>
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="Auto"/>
+                            <ColumnDefinition/>
+                        </Grid.ColumnDefinitions>
+                        <TextBlock VerticalAlignment="Center" Margin="30,0,20,0">Поиск</TextBlock>
+                        <TextBox Grid.Column="1" Name="TxtSearch" TextChanged="TxtSearch_TextChanged" VerticalContentAlignment="Center" Padding="5,0,0,0" Margin="5,10,350,10"></TextBox>
+                    </Grid>
+                    <ListView x:Name="ProductInStoreList" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
+                        <ListView.ItemTemplate>
+                            <DataTemplate>
+                                <Border BorderBrush="Gray" BorderThickness="1" Margin="5">
+                                    <Grid Width="300" Height="120">
+                                        <Grid.ColumnDefinitions>
+                                            <ColumnDefinition/>
+                                            <ColumnDefinition/>
+                                        </Grid.ColumnDefinitions>
+                                        <Grid.RowDefinitions>
+                                            <RowDefinition/>
+                                            <RowDefinition/>
+                                            <RowDefinition/>
+                                        </Grid.RowDefinitions>
+                                        <TextBlock Text="{Binding NameProduct}" TextWrapping="Wrap" Grid.ColumnSpan="2" TextAlignment="Center" Margin="5"></TextBlock>
+                                        <TextBlock Text="{Binding BarCode,StringFormat={}Код: {0}}" Grid.Row="1" Margin="5" HorizontalAlignment="Left"></TextBlock>
+                                        <TextBlock Text="{Binding PriceOfOne, StringFormat={}{0:F2} руб.}" Grid.Row="1" Margin="5" HorizontalAlignment="Right" Grid.Column="1"></TextBlock>
+                                    </Grid>
+                                </Border>
+                               
+                            </DataTemplate>
+                        </ListView.ItemTemplate>
+                        <ListView.ItemsPanel>
+                            <ItemsPanelTemplate>
+                                <WrapPanel></WrapPanel>
+                            </ItemsPanelTemplate>
+                        </ListView.ItemsPanel>
+                    </ListView>
+                </Grid>
+            </TabItem>
+        </TabControl>
+    </Grid>
+</Page>

+ 129 - 0
Cashier/MenuPage.xaml.cs

@@ -0,0 +1,129 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+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.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Threading;
+
+namespace Cashier
+{
+    /// <summary>
+    /// Interaction logic for MenuPage.xaml
+    /// </summary>
+    public partial class MenuPage : Page
+    {
+        ObservableCollection<RootDataOfProductInOrder> ProductInOrder = new ObservableCollection<RootDataOfProductInOrder>();
+
+        public MenuPage()
+        {
+            InitializeComponent();
+            TabCashier.SelectedIndex = 1;
+            BtnPayment.IsEnabled = Helper.WorkShiftID is null ? false : true;
+            ProductInStoreList.ItemsSource = Helper.ProductInStore;
+            ProductInOrderList.ItemsSource = ProductInOrder;
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Interval = new TimeSpan(0, 0, 1);
+            timer.Tick += Timer_Tick;
+            timer.Start();
+        }
+
+        private void Timer_Tick(object sender, EventArgs e)
+        {
+            BtnPayment.IsEnabled = Helper.WorkShiftID is null ? false : true;
+        }
+
+        private void TxtSearch_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            ProductInStoreList.ItemsSource = Helper.ProductInStore.Where(x => x.NameProduct.Contains(TxtSearch.Text)).ToList();
+        }
+
+        private void BtnDeleteInOrder_Click(object sender, RoutedEventArgs e)
+        {
+            var CurrentProduct = (sender as Button).DataContext as RootDataOfProductInOrder;
+            ProductInOrder.Remove(CurrentProduct);
+            TotalCost();
+        }
+
+        public void TotalCost()
+        {
+            decimal TotalCost = 0;
+            foreach (var item in ProductInOrder)
+            {
+                TotalCost += item.ProductInStore.PriceOfOne * item.AmountProduct;
+            }
+            TxtTotalCost.Text = TotalCost.ToString("F2") + " руб.";
+        }
+
+        private void BtnAddInOrder_Click(object sender, RoutedEventArgs e)
+        {
+            if (string.IsNullOrEmpty(TxtProductCode.Text) || TxtProductCode.Text.All(char.IsDigit) == false)
+            {
+                Helper.ErrorMessage("Не корректный номер продукта");
+                return;
+            } 
+            if (string.IsNullOrEmpty(TxtAmountProduct.Text) || TxtAmountProduct.Text.All(char.IsDigit) == false)
+            {
+                Helper.ErrorMessage("Не корректное количество");
+                return;
+            }
+            var CurrentProduct = Helper.ProductInStore.FirstOrDefault(x => x.BarCode == TxtProductCode.Text);
+            if (CurrentProduct == null)
+            {
+                Helper.ErrorMessage("Продукт не найден");
+                return;
+            }
+            RootDataOfProductInOrder dataOfProductInOrder = new RootDataOfProductInOrder()
+            {   
+                ProductInStore = CurrentProduct,
+                AmountProduct = Convert.ToInt32(TxtAmountProduct.Text) 
+            };
+            ProductInOrder.Add(dataOfProductInOrder);
+            TotalCost();
+        }
+
+        public async void PostDataOfOrder()
+        {
+            RootDataOfOrder rootDataOfOrder = new RootDataOfOrder()
+            {
+                Date = DateTime.Now,
+                IDWorkShift = Helper.WorkShiftID.Value,
+                ProductInOrders = ProductInOrder.ToList()
+            };
+            string Message = "Data of Order =" + JsonConvert.SerializeObject(rootDataOfOrder);
+            string IDStore = Helper.IDStore.ToString();
+            if (IDStore.Length == 1) IDStore = IDStore.Insert(0, "0");
+            IPEndPoint iPEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), Convert.ToInt32("102" + IDStore));
+            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+            await socket.ConnectAsync(iPEndPoint);
+            byte[] data = Encoding.UTF8.GetBytes(Message);
+            socket.Send(data);
+            StringBuilder builder = new StringBuilder();
+            data = new byte[256];
+            int bytes = 0;
+            do
+            {
+                bytes = socket.Receive(data);
+                builder.Append(Encoding.UTF8.GetString(data, 0, bytes));
+            } while (socket.Available >0);
+            string response = builder.ToString();
+        }
+
+        private void BtnCreateOrder_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+    }
+}

+ 15 - 0
Cashier/RootDataOfOrder.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Cashier
+{
+    class RootDataOfOrder
+    {
+        public DateTime Date { get; set; }
+        public int IDWorkShift { get; set; }
+        public List<RootDataOfProductInOrder> ProductInOrders { get; set; }
+    }
+}

+ 22 - 0
Cashier/RootDataOfProductInOrder.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Cashier
+{
+    class RootDataOfProductInOrder
+    {
+        public RootDataOfProductInStore ProductInStore { get; set; }
+        public int AmountProduct { get; set; }
+
+        public decimal Cost {
+            get
+            {
+                return ProductInStore.PriceOfOne * AmountProduct;
+            }
+
+        }
+    }
+}

+ 3 - 3
CentralServer/RootDataOfProductInStore.cs

@@ -4,11 +4,11 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace CentralServer
+namespace Cashier
 {
-   public class RootDataOfProductInStore
+    public class RootDataOfProductInStore
     {
-        public int ProductID { get; set; }
+        public int ProductInStoreID { get; set; }
         public string NameProduct { get; set; }
         public int Weight { get; set; }
         public int Packaging { get; set; }

+ 19 - 4
Cashier/StartWorkPage.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Net;
@@ -31,7 +32,7 @@ namespace Cashier
         {
             try
             {
-                if (IDStore.Length == 1) IDStore.Insert(0, "0");
+                if (IDStore.Length == 1) IDStore= IDStore.Insert(0, "0");
                 IPEndPoint iPEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), Convert.ToInt32("102" + IDStore));
                 Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                 socket.Connect(iPEndPoint);
@@ -45,7 +46,18 @@ namespace Cashier
                     byts = socket.Receive(data, data.Length, 0);
                     builder.Append(Encoding.UTF8.GetString(data, 0, byts));
                 } while (socket.Available > 0);
-                MessageBox.Show(builder.ToString());
+                string response = builder.ToString();
+                if (response.Contains("Добро пожаловать"))
+                {
+                    string Json = response.Split('=')[1];
+                    Helper.ProductInStore = JsonConvert.DeserializeObject<List<RootDataOfProductInStore>>(Json);
+                    Helper.InformationMessage(response.Split('=')[0]);
+                    ManagerFrame.MainFrame.Navigate(new MenuPage());
+                }
+                else
+                {
+                    Helper.ErrorMessage(response);
+                }
                 socket.Shutdown(SocketShutdown.Both);
                 socket.Close();
             }
@@ -73,7 +85,10 @@ namespace Cashier
                 Helper.ErrorMessage("Не корректный код сотрудника");
                 return;
             }
-            string Message = $"Code cashier={TxtNumberCashier.Text}; Code employee ={TxtCodeEmployee.Text}";
+            Helper.IDStore = Convert.ToInt32(TxtIDStore.Text);
+            Helper.IDCashier = Convert.ToInt32(TxtNumberCashier.Text);
+            Helper.NumberEmployee = TxtCodeEmployee.Text;
+            string Message = $"Authorization - Code cashier={TxtNumberCashier.Text}; Code employee ={TxtCodeEmployee.Text}";
             ConnectToStore(TxtIDStore.Text, Message);
         }
     }

BIN
Cashier/bin/Debug/Cashier.exe


BIN
Cashier/bin/Debug/Cashier.pdb


CentralServer/bin/Debug/Newtonsoft.Json.dll → Cashier/bin/Debug/Newtonsoft.Json.dll


CentralServer/bin/Debug/Newtonsoft.Json.xml → Cashier/bin/Debug/Newtonsoft.Json.xml


BIN
Cashier/obj/Debug/App.baml


CentralServer/obj/Debug/CentralServer.csproj.CopyComplete → Cashier/obj/Debug/Cashier.csproj.CopyComplete


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

@@ -1 +1 @@
-9a651debc9ca2b9a7e9a16e7404e195d9a394182
+2a7d853affadc751ab37bd8d619392c7a0894f67

+ 7 - 0
Cashier/obj/Debug/Cashier.csproj.FileListAbsolute.txt

@@ -16,3 +16,10 @@ C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\Cashier.csproj
 C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\Cashier.csproj.CoreCompileInputs.cache
 C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\Cashier.exe
 C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\Cashier.pdb
+C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\MenuPage.g.cs
+C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\MenuPage.baml
+C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\bin\Debug\Newtonsoft.Json.dll
+C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\bin\Debug\Newtonsoft.Json.xml
+C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\Cashier.csproj.CopyComplete
+C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\EnabledCashierWindow.g.cs
+C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\obj\Debug\EnabledCashierWindow.baml

BIN
Cashier/obj/Debug/Cashier.csprojAssemblyReference.cache


BIN
Cashier/obj/Debug/Cashier.exe


BIN
Cashier/obj/Debug/Cashier.g.resources


BIN
Cashier/obj/Debug/Cashier.pdb


+ 4 - 4
Cashier/obj/Debug/Cashier_MarkupCompile.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\App.xaml
-2-759188912
+4-2132370067
 
-8-839002340
-13-1505183044
-MainWindow.xaml;StartWorkPage.xaml;
+1312901158
+14-708277382
+EnabledCashierWindow.xaml;MainWindow.xaml;MenuPage.xaml;StartWorkPage.xaml;
 
 False
 

+ 5 - 5
Cashier/obj/Debug/Cashier_MarkupCompile.i.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 C:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\App.xaml
-2-759188912
+4-2132370067
 
-9-1681361707
-13-1505183044
-MainWindow.xaml;StartWorkPage.xaml;
+14-829458209
+14-708277382
+EnabledCashierWindow.xaml;MainWindow.xaml;MenuPage.xaml;StartWorkPage.xaml;
 
-True
+False
 

+ 0 - 4
Cashier/obj/Debug/Cashier_MarkupCompile.i.lref

@@ -1,4 +0,0 @@
-
-
-FC:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\StartWorkPage.xaml;;
-

+ 2 - 0
Cashier/obj/Debug/Cashier_MarkupCompile.lref

@@ -1,5 +1,7 @@
 
 FC:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\App.xaml;;
+FC:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\EnabledCashierWindow.xaml;;
 FC:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\MainWindow.xaml;;
+FC:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\MenuPage.xaml;;
 FC:\Users\gr672_pgv\source\repos\StoreAllProject\Cashier\StartWorkPage.xaml;;
 

BIN
Cashier/obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
Cashier/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


BIN
Cashier/obj/Debug/EnabledCashierWindow.baml


+ 106 - 0
Cashier/obj/Debug/EnabledCashierWindow.g.cs

@@ -0,0 +1,106 @@
+#pragma checksum "..\..\EnabledCashierWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FF5F9890C70B21A2556CBAA5EED314605DD625D9F95B5BB06480F47F8A537ABA"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Cashier;
+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 Cashier {
+    
+    
+    /// <summary>
+    /// EnabledCashierWindow
+    /// </summary>
+    public partial class EnabledCashierWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 19 "..\..\EnabledCashierWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtNumberEmployee;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 20 "..\..\EnabledCashierWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnEnabledCashier;
+        
+        #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("/Cashier;component/enabledcashierwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\EnabledCashierWindow.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.TxtNumberEmployee = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 2:
+            this.BtnEnabledCashier = ((System.Windows.Controls.Button)(target));
+            
+            #line 20 "..\..\EnabledCashierWindow.xaml"
+            this.BtnEnabledCashier.Click += new System.Windows.RoutedEventHandler(this.BtnEnabledCashier_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 106 - 0
Cashier/obj/Debug/EnabledCashierWindow.g.i.cs

@@ -0,0 +1,106 @@
+#pragma checksum "..\..\EnabledCashierWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "FF5F9890C70B21A2556CBAA5EED314605DD625D9F95B5BB06480F47F8A537ABA"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Cashier;
+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 Cashier {
+    
+    
+    /// <summary>
+    /// EnabledCashierWindow
+    /// </summary>
+    public partial class EnabledCashierWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 19 "..\..\EnabledCashierWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtNumberEmployee;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 20 "..\..\EnabledCashierWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnEnabledCashier;
+        
+        #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("/Cashier;component/enabledcashierwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\EnabledCashierWindow.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.TxtNumberEmployee = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 2:
+            this.BtnEnabledCashier = ((System.Windows.Controls.Button)(target));
+            
+            #line 20 "..\..\EnabledCashierWindow.xaml"
+            this.BtnEnabledCashier.Click += new System.Windows.RoutedEventHandler(this.BtnEnabledCashier_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

BIN
Cashier/obj/Debug/MainWindow.baml


+ 42 - 8
Cashier/obj/Debug/MainWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2C0E03236AB82A9F6606ED1A42491FDD077861BF0FAFD7EA68AB826FD14E39A3"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "65C9E5D7D40D3E913C3670FB25AFA15D3D63D35866709B72D3728D2FD0252592"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
@@ -41,15 +41,31 @@ namespace Cashier {
     public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
         
-        #line 14 "..\..\MainWindow.xaml"
+        #line 20 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button BtnBack;
+        internal System.Windows.Controls.Button BtnStartWorkShift;
         
         #line default
         #line hidden
         
         
-        #line 15 "..\..\MainWindow.xaml"
+        #line 21 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnBlockCashier;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 22 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnEndWorkShift;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 25 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Frame MainFrame;
         
@@ -87,18 +103,36 @@ namespace Cashier {
             switch (connectionId)
             {
             case 1:
-            this.BtnBack = ((System.Windows.Controls.Button)(target));
+            this.BtnStartWorkShift = ((System.Windows.Controls.Button)(target));
             
-            #line 14 "..\..\MainWindow.xaml"
-            this.BtnBack.Click += new System.Windows.RoutedEventHandler(this.BtnBack_Click);
+            #line 20 "..\..\MainWindow.xaml"
+            this.BtnStartWorkShift.Click += new System.Windows.RoutedEventHandler(this.BtnStartWorkShift_Click);
             
             #line default
             #line hidden
             return;
             case 2:
+            this.BtnBlockCashier = ((System.Windows.Controls.Button)(target));
+            
+            #line 21 "..\..\MainWindow.xaml"
+            this.BtnBlockCashier.Click += new System.Windows.RoutedEventHandler(this.BtnBlockCashier_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.BtnEndWorkShift = ((System.Windows.Controls.Button)(target));
+            
+            #line 22 "..\..\MainWindow.xaml"
+            this.BtnEndWorkShift.Click += new System.Windows.RoutedEventHandler(this.BtnEndWorkShift_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 4:
             this.MainFrame = ((System.Windows.Controls.Frame)(target));
             
-            #line 15 "..\..\MainWindow.xaml"
+            #line 25 "..\..\MainWindow.xaml"
             this.MainFrame.ContentRendered += new System.EventHandler(this.MainFrame_ContentRendered);
             
             #line default

+ 42 - 8
Cashier/obj/Debug/MainWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2C0E03236AB82A9F6606ED1A42491FDD077861BF0FAFD7EA68AB826FD14E39A3"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "65C9E5D7D40D3E913C3670FB25AFA15D3D63D35866709B72D3728D2FD0252592"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
@@ -41,15 +41,31 @@ namespace Cashier {
     public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
         
-        #line 14 "..\..\MainWindow.xaml"
+        #line 20 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button BtnBack;
+        internal System.Windows.Controls.Button BtnStartWorkShift;
         
         #line default
         #line hidden
         
         
-        #line 15 "..\..\MainWindow.xaml"
+        #line 21 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnBlockCashier;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 22 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnEndWorkShift;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 25 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Frame MainFrame;
         
@@ -87,18 +103,36 @@ namespace Cashier {
             switch (connectionId)
             {
             case 1:
-            this.BtnBack = ((System.Windows.Controls.Button)(target));
+            this.BtnStartWorkShift = ((System.Windows.Controls.Button)(target));
             
-            #line 14 "..\..\MainWindow.xaml"
-            this.BtnBack.Click += new System.Windows.RoutedEventHandler(this.BtnBack_Click);
+            #line 20 "..\..\MainWindow.xaml"
+            this.BtnStartWorkShift.Click += new System.Windows.RoutedEventHandler(this.BtnStartWorkShift_Click);
             
             #line default
             #line hidden
             return;
             case 2:
+            this.BtnBlockCashier = ((System.Windows.Controls.Button)(target));
+            
+            #line 21 "..\..\MainWindow.xaml"
+            this.BtnBlockCashier.Click += new System.Windows.RoutedEventHandler(this.BtnBlockCashier_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.BtnEndWorkShift = ((System.Windows.Controls.Button)(target));
+            
+            #line 22 "..\..\MainWindow.xaml"
+            this.BtnEndWorkShift.Click += new System.Windows.RoutedEventHandler(this.BtnEndWorkShift_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 4:
             this.MainFrame = ((System.Windows.Controls.Frame)(target));
             
-            #line 15 "..\..\MainWindow.xaml"
+            #line 25 "..\..\MainWindow.xaml"
             this.MainFrame.ContentRendered += new System.EventHandler(this.MainFrame_ContentRendered);
             
             #line default

BIN
Cashier/obj/Debug/MenuPage.baml


+ 220 - 0
Cashier/obj/Debug/MenuPage.g.cs

@@ -0,0 +1,220 @@
+#pragma checksum "..\..\MenuPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "63A468099F4CE4187EDFB1C5E2B0E2897FF5A13E93B8255C1D08371964B75D81"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Cashier;
+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 Cashier {
+    
+    
+    /// <summary>
+    /// MenuPage
+    /// </summary>
+    public partial class MenuPage : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
+        
+        
+        #line 12 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TabControl TabCashier;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 13 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TabItem BtnPayment;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 30 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtProductCode;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 32 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtAmountProduct;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 34 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnAddInOrder;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 46 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid ProductInOrderList;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 67 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock TxtTotalCost;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 68 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnCreateOrder;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 84 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtSearch;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 86 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ListView ProductInStoreList;
+        
+        #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("/Cashier;component/menupage.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\MenuPage.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.TabCashier = ((System.Windows.Controls.TabControl)(target));
+            return;
+            case 2:
+            this.BtnPayment = ((System.Windows.Controls.TabItem)(target));
+            return;
+            case 3:
+            this.TxtProductCode = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 4:
+            this.TxtAmountProduct = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 5:
+            this.BtnAddInOrder = ((System.Windows.Controls.Button)(target));
+            
+            #line 34 "..\..\MenuPage.xaml"
+            this.BtnAddInOrder.Click += new System.Windows.RoutedEventHandler(this.BtnAddInOrder_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 6:
+            this.ProductInOrderList = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 8:
+            this.TxtTotalCost = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 9:
+            this.BtnCreateOrder = ((System.Windows.Controls.Button)(target));
+            return;
+            case 10:
+            this.TxtSearch = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 84 "..\..\MenuPage.xaml"
+            this.TxtSearch.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TxtSearch_TextChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 11:
+            this.ProductInStoreList = ((System.Windows.Controls.ListView)(target));
+            return;
+            }
+            this._contentLoaded = true;
+        }
+        
+        [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.Performance", "CA1800:DoNotCastUnnecessarily")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 7:
+            
+            #line 60 "..\..\MenuPage.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeleteInOrder_Click);
+            
+            #line default
+            #line hidden
+            break;
+            }
+        }
+    }
+}
+

+ 226 - 0
Cashier/obj/Debug/MenuPage.g.i.cs

@@ -0,0 +1,226 @@
+#pragma checksum "..\..\MenuPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "204F61AB256193FD698DCA97BEAB66709DB5DBCB8FB8D04589133C2FA73E685B"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Cashier;
+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 Cashier {
+    
+    
+    /// <summary>
+    /// MenuPage
+    /// </summary>
+    public partial class MenuPage : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
+        
+        
+        #line 12 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TabControl TabCashier;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 13 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TabItem BtnPayment;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 30 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtProductCode;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 32 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtAmountProduct;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 34 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnAddInOrder;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 46 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid ProductInOrderList;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 67 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock TxtTotalCost;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 68 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnCreateOrder;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 84 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtSearch;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 86 "..\..\MenuPage.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ListView ProductInStoreList;
+        
+        #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("/Cashier;component/menupage.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\MenuPage.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.TabCashier = ((System.Windows.Controls.TabControl)(target));
+            return;
+            case 2:
+            this.BtnPayment = ((System.Windows.Controls.TabItem)(target));
+            return;
+            case 3:
+            this.TxtProductCode = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 4:
+            this.TxtAmountProduct = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 5:
+            this.BtnAddInOrder = ((System.Windows.Controls.Button)(target));
+            
+            #line 34 "..\..\MenuPage.xaml"
+            this.BtnAddInOrder.Click += new System.Windows.RoutedEventHandler(this.BtnAddInOrder_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 6:
+            this.ProductInOrderList = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 8:
+            this.TxtTotalCost = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 9:
+            this.BtnCreateOrder = ((System.Windows.Controls.Button)(target));
+            
+            #line 68 "..\..\MenuPage.xaml"
+            this.BtnCreateOrder.Click += new System.Windows.RoutedEventHandler(this.BtnCreateOrder_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 10:
+            this.TxtSearch = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 84 "..\..\MenuPage.xaml"
+            this.TxtSearch.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TxtSearch_TextChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 11:
+            this.ProductInStoreList = ((System.Windows.Controls.ListView)(target));
+            return;
+            }
+            this._contentLoaded = true;
+        }
+        
+        [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.Performance", "CA1800:DoNotCastUnnecessarily")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 7:
+            
+            #line 60 "..\..\MenuPage.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeleteInOrder_Click);
+            
+            #line default
+            #line hidden
+            break;
+            }
+        }
+    }
+}
+

BIN
Cashier/obj/Debug/StartWorkPage.baml


BIN
Cashier/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll


+ 0 - 1
CentralServer/packages.config

@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="EntityFramework" version="6.2.0" targetFramework="net472" />
   <package id="Newtonsoft.Json" version="12.0.3" targetFramework="net472" />
 </packages>

+ 0 - 23
CentralServer/App.config

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <configSections>
-    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-  </configSections>
-  <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
-  </startup>
-  <connectionStrings>
-    <add name="gr672_pgvEntities" connectionString="metadata=res://*/StoreModel.csdl|res://*/StoreModel.ssdl|res://*/StoreModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=mssql;initial catalog=gr672_pgv;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
-  </connectionStrings>
-  <entityFramework>
-    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
-      <parameters>
-        <parameter value="mssqllocaldb" />
-      </parameters>
-    </defaultConnectionFactory>
-    <providers>
-      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
-    </providers>
-  </entityFramework>
-</configuration>

+ 0 - 74
CentralServer/CentralServer.csproj

@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{A8239E54-1EC2-4E1B-A7D0-371979E36CD5}</ProjectGuid>
-    <OutputType>Exe</OutputType>
-    <RootNamespace>CentralServer</RootNamespace>
-    <AssemblyName>CentralServer</AssemblyName>
-    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
-    <Deterministic>true</Deterministic>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <PlatformTarget>AnyCPU</PlatformTarget>
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
-      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
-    </Reference>
-    <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
-      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
-    </Reference>
-    <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.ComponentModel.DataAnnotations" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Runtime.Serialization" />
-    <Reference Include="System.Security" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Net.Http" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Program.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="RootDataOfCashier.cs" />
-    <Compile Include="RootDataOfEmployee.cs" />
-    <Compile Include="RootDataOfProductInStore.cs" />
-    <Compile Include="RootDataOfStore.cs" />
-    <Compile Include="RootDataOfWorkShift.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="App.config" />
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>

+ 0 - 81
CentralServer/Program.cs

@@ -1,81 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CentralServer
-{
-    class Program
-    {
-
-        static void Main(string[] args)
-        {
-            Listener();
-            Console.Read();
-        }
-
-        public static async void Listener()
-        {
-            HttpListener listener = new HttpListener();
-            listener.Prefixes.Add("http://127.0.0.1:8888/");
-            listener.Start();
-            Console.WriteLine("Start server...");
-            while (true)
-            {
-                HttpListenerContext context = await listener.GetContextAsync();
-                HttpListenerRequest request = context.Request;
-                if (request.RawUrl.Contains("/getDataOfStore"))
-                {
-                    string StoreID = request.RawUrl.Split('=')[1];
-                    var Store = db.Stores.Find(Convert.ToInt32(StoreID));
-                    HttpListenerResponse response = context.Response;
-                    if (Store is null)
-                    {
-                        byte[] buffer = Encoding.UTF8.GetBytes("Магазин не найден");
-                        response.ContentLength64 = buffer.Length;
-                        Stream output = response.OutputStream;
-                        output.Write(buffer, 0, buffer.Length);
-                        output.Close();
-                    }
-                    else
-                    {
-                        List<RootDataOfCashier> dataOfCashier = new List<RootDataOfCashier>();
-                        List<RootDataOfProductInStore> dataOfProductInStores = new List<RootDataOfProductInStore>();
-                        foreach (var item in Store.Cashiers)
-                        {
-                            dataOfCashier.Add(new RootDataOfCashier { CashierID = item.CashierID });
-                        }
-                        foreach (var item in Store.ProductInStores)
-                        {
-                            dataOfProductInStores.Add(new RootDataOfProductInStore
-                            {
-                                ProductID = item.Product.ProductID,
-                                NameProduct = item.Product.NameProduct,
-                                Weight = item.Product.Weight,
-                                Packaging = item.Product.Packaging,
-                                PriceOfOne = item.Product.PriceOfOne,
-                                BarCode = item.Product.BarCode,
-                                RemainsProduct= item.RemainsProduct
-                            });
-                        }
-                        RootDataOfStore rootDataOfStore = new RootDataOfStore();
-                        rootDataOfStore.Product = dataOfProductInStores;
-                        rootDataOfStore.Cashiers = dataOfCashier;
-                        rootDataOfStore.StoreID = Store.StoreID;
-                        rootDataOfStore.Address = Store.Address;
-                        string Json = JsonConvert.SerializeObject(rootDataOfStore);
-                        byte[] buffer = Encoding.UTF8.GetBytes(Json);
-                        response.ContentLength64 = buffer.Length;
-                        Stream output = response.OutputStream;
-                        output.Write(buffer, 0, buffer.Length);
-                        output.Close();
-                    }
-                }
-            }
-        }
-    }
-}

+ 0 - 36
CentralServer/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("CentralServer")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CentralServer")]
-[assembly: AssemblyCopyright("Copyright ©  2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("a8239e54-1ec2-4e1b-a7d0-371979e36cd5")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 13
CentralServer/RootDataOfCashier.cs

@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CentralServer
-{
-    public class RootDataOfCashier
-    {
-        public int CashierID { get; set; }
-    }
-}

+ 0 - 17
CentralServer/RootDataOfEmployee.cs

@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CentralServer
-{
-    public class RootDataOfEmployee
-    {
-        public int EmployeeID { get; set; }
-        public string LastName { get; set; }
-        public string Name { get; set; }
-        public string MiddleName { get; set; }
-        public string Code { get; set; }
-    }
-}

+ 0 - 16
CentralServer/RootDataOfStore.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CentralServer
-{
-    public class RootDataOfStore
-    {
-        public int StoreID { get; set; }
-        public string Address { get; set; }
-        public List<RootDataOfCashier> Cashiers { get; set; }
-        public List<RootDataOfProductInStore> Product { get; set; }
-    }
-}

+ 0 - 16
CentralServer/RootDataOfWorkShift.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CentralServer
-{
-    public class RootDataOfWorkShift
-    {
-        public RootDataOfCashier Cashier { get; set; }
-        public RootDataOfEmployee Employee { get; set; }
-        public DateTime StartDateAndTimeWork { get; set; }
-        public Nullable<DateTime> EndDateAndTimeWork { get; set; }
-    }
-}

BIN
CentralServer/bin/Debug/CentralServer.exe


+ 0 - 23
CentralServer/bin/Debug/CentralServer.exe.config

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-  <configSections>
-    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-  </configSections>
-  <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
-  </startup>
-  <connectionStrings>
-    <add name="gr672_pgvEntities" connectionString="metadata=res://*/StoreModel.csdl|res://*/StoreModel.ssdl|res://*/StoreModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=mssql;initial catalog=gr672_pgv;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
-  </connectionStrings>
-  <entityFramework>
-    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
-      <parameters>
-        <parameter value="mssqllocaldb" />
-      </parameters>
-    </defaultConnectionFactory>
-    <providers>
-      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
-    </providers>
-  </entityFramework>
-</configuration>

BIN
CentralServer/bin/Debug/CentralServer.pdb


BIN
CentralServer/bin/Debug/EntityFramework.SqlServer.dll


File diff suppressed because it is too large
+ 0 - 2093
CentralServer/bin/Debug/EntityFramework.SqlServer.xml


BIN
CentralServer/bin/Debug/EntityFramework.dll


File diff suppressed because it is too large
+ 0 - 53236
CentralServer/bin/Debug/EntityFramework.xml


+ 0 - 4
CentralServer/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs

@@ -1,4 +0,0 @@
-// <autogenerated />
-using System;
-using System.Reflection;
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

+ 0 - 1
CentralServer/obj/Debug/CentralServer.csproj.CoreCompileInputs.cache

@@ -1 +0,0 @@
-ecd59829e19c329d962690f484cc8e792284b68a

+ 0 - 14
CentralServer/obj/Debug/CentralServer.csproj.FileListAbsolute.txt

@@ -1,14 +0,0 @@
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\CentralServer.exe.config
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\CentralServer.exe
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\CentralServer.pdb
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\EntityFramework.dll
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\EntityFramework.SqlServer.dll
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\Newtonsoft.Json.dll
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\EntityFramework.xml
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\EntityFramework.SqlServer.xml
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\bin\Debug\Newtonsoft.Json.xml
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\obj\Debug\CentralServer.csprojAssemblyReference.cache
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\obj\Debug\CentralServer.csproj.CoreCompileInputs.cache
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\obj\Debug\CentralServer.csproj.CopyComplete
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\obj\Debug\CentralServer.exe
-C:\Users\gr672_pgv\source\repos\StoreAllProject\CentralServer\obj\Debug\CentralServer.pdb

BIN
CentralServer/obj/Debug/CentralServer.csprojAssemblyReference.cache


BIN
CentralServer/obj/Debug/CentralServer.exe


BIN
CentralServer/obj/Debug/CentralServer.pdb


BIN
CentralServer/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 0 - 0
CentralServer/obj/Debug/TempPE/StoreModel.Context.cs.dll


BIN
CentralServer/obj/Debug/TempPE/StoreModel.Designer.cs.dll


BIN
CentralServer/obj/Debug/TempPE/StoreModel.cs.dll


+ 0 - 319
CentralServer/obj/Debug/edmxResourcesToEmbed/StoreModel.csdl

@@ -1,319 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Schema Namespace="gr672_pgvModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
-  <EntityContainer Name="gr672_pgvEntities" annotation:LazyLoadingEnabled="true">
-    <EntitySet Name="Employees" EntityType="gr672_pgvModel.Employee" />
-    <EntitySet Name="Orders" EntityType="gr672_pgvModel.Order" />
-    <EntitySet Name="PaymentMetods" EntityType="gr672_pgvModel.PaymentMetod" />
-    <EntitySet Name="Products" EntityType="gr672_pgvModel.Product" />
-    <EntitySet Name="ProductInOrders" EntityType="gr672_pgvModel.ProductInOrder" />
-    <EntitySet Name="Stores" EntityType="gr672_pgvModel.Store" />
-    <EntitySet Name="WorkShifts" EntityType="gr672_pgvModel.WorkShift" />
-    <AssociationSet Name="FK_WorkShift_Employee" Association="gr672_pgvModel.FK_WorkShift_Employee">
-      <End Role="Employee" EntitySet="Employees" />
-      <End Role="WorkShift" EntitySet="WorkShifts" />
-    </AssociationSet>
-    <AssociationSet Name="FK_Order_PaymentMetod" Association="gr672_pgvModel.FK_Order_PaymentMetod">
-      <End Role="PaymentMetod" EntitySet="PaymentMetods" />
-      <End Role="Order" EntitySet="Orders" />
-    </AssociationSet>
-    <AssociationSet Name="FK_Order_WorkShift" Association="gr672_pgvModel.FK_Order_WorkShift">
-      <End Role="WorkShift" EntitySet="WorkShifts" />
-      <End Role="Order" EntitySet="Orders" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInOrder_Order" Association="gr672_pgvModel.FK_ProductInOrder_Order">
-      <End Role="Order" EntitySet="Orders" />
-      <End Role="ProductInOrder" EntitySet="ProductInOrders" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInOrder_Product" Association="gr672_pgvModel.FK_ProductInOrder_Product">
-      <End Role="Product" EntitySet="Products" />
-      <End Role="ProductInOrder" EntitySet="ProductInOrders" />
-    </AssociationSet>
-    <EntitySet Name="Cashiers" EntityType="gr672_pgvModel.Cashier" />
-    <AssociationSet Name="FK_Cashier_Store" Association="gr672_pgvModel.FK_Cashier_Store">
-      <End Role="Store" EntitySet="Stores" />
-      <End Role="Cashier" EntitySet="Cashiers" />
-    </AssociationSet>
-    <AssociationSet Name="FK_WorkShift_Cashier" Association="gr672_pgvModel.FK_WorkShift_Cashier">
-      <End Role="Cashier" EntitySet="Cashiers" />
-      <End Role="WorkShift" EntitySet="WorkShifts" />
-    </AssociationSet>
-    <EntitySet Name="PaymentOrders" EntityType="gr672_pgvModel.PaymentOrder" />
-    <EntitySet Name="ProductInStores" EntityType="gr672_pgvModel.ProductInStore" />
-    <AssociationSet Name="FK_PaymentOrder_Order" Association="gr672_pgvModel.FK_PaymentOrder_Order">
-      <End Role="Order" EntitySet="Orders" />
-      <End Role="PaymentOrder" EntitySet="PaymentOrders" />
-    </AssociationSet>
-    <AssociationSet Name="FK_PaymentOrder_PaymentMetod" Association="gr672_pgvModel.FK_PaymentOrder_PaymentMetod">
-      <End Role="PaymentMetod" EntitySet="PaymentMetods" />
-      <End Role="PaymentOrder" EntitySet="PaymentOrders" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInStore_Product" Association="gr672_pgvModel.FK_ProductInStore_Product">
-      <End Role="Product" EntitySet="Products" />
-      <End Role="ProductInStore" EntitySet="ProductInStores" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInOrder_ProductInStore" Association="gr672_pgvModel.FK_ProductInOrder_ProductInStore">
-      <End Role="ProductInStore" EntitySet="ProductInStores" />
-      <End Role="ProductInOrder" EntitySet="ProductInOrders" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInStore_Store" Association="gr672_pgvModel.FK_ProductInStore_Store">
-      <End Role="Store" EntitySet="Stores" />
-      <End Role="ProductInStore" EntitySet="ProductInStores" />
-    </AssociationSet>
-  </EntityContainer>
-  <EntityType Name="Employee">
-    <Key>
-      <PropertyRef Name="EmployeeID" />
-    </Key>
-    <Property Name="EmployeeID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="LastName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="MiddleName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
-    <Property Name="Code" Type="String" Nullable="false" MaxLength="5" FixedLength="false" Unicode="true" />
-    <NavigationProperty Name="WorkShifts" Relationship="gr672_pgvModel.FK_WorkShift_Employee" FromRole="Employee" ToRole="WorkShift" />
-  </EntityType>
-  <EntityType Name="Order">
-    <Key>
-      <PropertyRef Name="OrderID" />
-    </Key>
-    <Property Name="OrderID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
-    <Property Name="IDWorkShift" Type="Int32" Nullable="false" />
-    <Property Name="State" Type="Boolean" Nullable="false" />
-    <Property Name="IDPaymentMetod" Type="Int32" />
-    <NavigationProperty Name="PaymentMetod" Relationship="gr672_pgvModel.FK_Order_PaymentMetod" FromRole="Order" ToRole="PaymentMetod" />
-    <NavigationProperty Name="WorkShift" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="Order" ToRole="WorkShift" />
-    <NavigationProperty Name="ProductInOrders" Relationship="gr672_pgvModel.FK_ProductInOrder_Order" FromRole="Order" ToRole="ProductInOrder" />
-    <NavigationProperty Name="PaymentOrders" Relationship="gr672_pgvModel.FK_PaymentOrder_Order" FromRole="Order" ToRole="PaymentOrder" />
-  </EntityType>
-  <EntityType Name="PaymentMetod">
-    <Key>
-      <PropertyRef Name="PaymentMetodID" />
-    </Key>
-    <Property Name="PaymentMetodID" Type="Int32" Nullable="false" />
-    <Property Name="PaymentMetodName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
-    <NavigationProperty Name="Orders" Relationship="gr672_pgvModel.FK_Order_PaymentMetod" FromRole="PaymentMetod" ToRole="Order" />
-    <NavigationProperty Name="PaymentOrders" Relationship="gr672_pgvModel.FK_PaymentOrder_PaymentMetod" FromRole="PaymentMetod" ToRole="PaymentOrder" />
-  </EntityType>
-  <EntityType Name="Product">
-    <Key>
-      <PropertyRef Name="ProductID" />
-    </Key>
-    <Property Name="ProductID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="NameProduct" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
-    <Property Name="Weight" Type="Int32" Nullable="false" />
-    <Property Name="Packaging" Type="Int32" Nullable="false" />
-    <Property Name="PriceOfOne" Type="Decimal" Nullable="false" Precision="19" Scale="4" />
-    <Property Name="BarCode" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
-    <NavigationProperty Name="ProductInOrders" Relationship="gr672_pgvModel.FK_ProductInOrder_Product" FromRole="Product" ToRole="ProductInOrder" />
-    <NavigationProperty Name="ProductInStores" Relationship="gr672_pgvModel.FK_ProductInStore_Product" FromRole="Product" ToRole="ProductInStore" />
-  </EntityType>
-  <EntityType Name="ProductInOrder">
-    <Key>
-      <PropertyRef Name="IDOrder" />
-      <PropertyRef Name="IDProduct" />
-    </Key>
-    <Property Name="IDOrder" Type="Int32" Nullable="false" />
-    <Property Name="IDProduct" Type="Int32" Nullable="false" />
-    <Property Name="AmountProduct" Type="Int32" Nullable="false" />
-    <NavigationProperty Name="Order" Relationship="gr672_pgvModel.FK_ProductInOrder_Order" FromRole="ProductInOrder" ToRole="Order" />
-    <NavigationProperty Name="Product" Relationship="gr672_pgvModel.FK_ProductInOrder_Product" FromRole="ProductInOrder" ToRole="Product" />
-    <NavigationProperty Name="ProductInStore" Relationship="gr672_pgvModel.FK_ProductInOrder_ProductInStore" FromRole="ProductInOrder" ToRole="ProductInStore" />
-  </EntityType>
-  <EntityType Name="Store">
-    <Key>
-      <PropertyRef Name="StoreID" />
-    </Key>
-    <Property Name="StoreID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="Address" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
-    <NavigationProperty Name="Cashiers" Relationship="gr672_pgvModel.FK_Cashier_Store" FromRole="Store" ToRole="Cashier" />
-    <NavigationProperty Name="ProductInStores" Relationship="gr672_pgvModel.FK_ProductInStore_Store" FromRole="Store" ToRole="ProductInStore" />
-  </EntityType>
-  <EntityType Name="WorkShift">
-    <Key>
-      <PropertyRef Name="WorkShiftID" />
-    </Key>
-    <Property Name="WorkShiftID" Type="Int32" Nullable="false" />
-    <Property Name="IDCashier" Type="Int32" Nullable="false" />
-    <Property Name="IDEmployee" Type="Int32" Nullable="false" />
-    <Property Name="StartDateAndTimeWork" Type="DateTime" Nullable="false" Precision="3" />
-    <Property Name="EndDateAndTimeWork" Type="DateTime" Precision="3" />
-    <NavigationProperty Name="Employee" Relationship="gr672_pgvModel.FK_WorkShift_Employee" FromRole="WorkShift" ToRole="Employee" />
-    <NavigationProperty Name="Orders" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="WorkShift" ToRole="Order" />
-    <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="WorkShift" ToRole="Cashier" />
-  </EntityType>
-  <Association Name="FK_WorkShift_Employee">
-    <End Type="gr672_pgvModel.Employee" Role="Employee" Multiplicity="1" />
-    <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Employee">
-        <PropertyRef Name="EmployeeID" />
-      </Principal>
-      <Dependent Role="WorkShift">
-        <PropertyRef Name="IDEmployee" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_Order_PaymentMetod">
-    <End Type="gr672_pgvModel.PaymentMetod" Role="PaymentMetod" Multiplicity="0..1" />
-    <End Type="gr672_pgvModel.Order" Role="Order" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="PaymentMetod">
-        <PropertyRef Name="PaymentMetodID" />
-      </Principal>
-      <Dependent Role="Order">
-        <PropertyRef Name="IDPaymentMetod" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_Order_WorkShift">
-    <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="1" />
-    <End Type="gr672_pgvModel.Order" Role="Order" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="WorkShift">
-        <PropertyRef Name="WorkShiftID" />
-      </Principal>
-      <Dependent Role="Order">
-        <PropertyRef Name="IDWorkShift" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInOrder_Order">
-    <End Type="gr672_pgvModel.Order" Role="Order" Multiplicity="1" />
-    <End Type="gr672_pgvModel.ProductInOrder" Role="ProductInOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Order">
-        <PropertyRef Name="OrderID" />
-      </Principal>
-      <Dependent Role="ProductInOrder">
-        <PropertyRef Name="IDOrder" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInOrder_Product">
-    <End Type="gr672_pgvModel.Product" Role="Product" Multiplicity="1" />
-    <End Type="gr672_pgvModel.ProductInOrder" Role="ProductInOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Product">
-        <PropertyRef Name="ProductID" />
-      </Principal>
-      <Dependent Role="ProductInOrder">
-        <PropertyRef Name="IDProduct" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <EntityType Name="Cashier">
-    <Key>
-      <PropertyRef Name="CashierID" />
-    </Key>
-    <Property Name="CashierID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-    <Property Name="IDStore" Type="Int32" Nullable="false" />
-    <NavigationProperty Name="Store" Relationship="gr672_pgvModel.FK_Cashier_Store" FromRole="Cashier" ToRole="Store" />
-    <NavigationProperty Name="WorkShifts" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="Cashier" ToRole="WorkShift" />
-  </EntityType>
-  <Association Name="FK_Cashier_Store">
-    <End Type="gr672_pgvModel.Store" Role="Store" Multiplicity="1" />
-    <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Store">
-        <PropertyRef Name="StoreID" />
-      </Principal>
-      <Dependent Role="Cashier">
-        <PropertyRef Name="IDStore" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_WorkShift_Cashier">
-    <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="1" />
-    <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Cashier">
-        <PropertyRef Name="CashierID" />
-      </Principal>
-      <Dependent Role="WorkShift">
-        <PropertyRef Name="IDCashier" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <EntityType Name="PaymentOrder">
-    <Key>
-      <PropertyRef Name="PaymentID" />
-    </Key>
-    <Property Name="PaymentID" Type="Int32" Nullable="false" />
-    <Property Name="IDPaymentMetod" Type="Int32" Nullable="false" />
-    <Property Name="IDOrder" Type="Int32" Nullable="false" />
-    <NavigationProperty Name="Order" Relationship="gr672_pgvModel.FK_PaymentOrder_Order" FromRole="PaymentOrder" ToRole="Order" />
-    <NavigationProperty Name="PaymentMetod" Relationship="gr672_pgvModel.FK_PaymentOrder_PaymentMetod" FromRole="PaymentOrder" ToRole="PaymentMetod" />
-  </EntityType>
-  <EntityType Name="ProductInStore">
-    <Key>
-      <PropertyRef Name="ProductInStoreID" />
-    </Key>
-    <Property Name="IDStore" Type="Int32" Nullable="false" />
-    <Property Name="IDProduct" Type="Int32" Nullable="false" />
-    <Property Name="RemainsProduct" Type="Int32" Nullable="false" />
-    <Property Name="ProductInStoreID" Type="Int32" Nullable="false" />
-    <NavigationProperty Name="Product" Relationship="gr672_pgvModel.FK_ProductInStore_Product" FromRole="ProductInStore" ToRole="Product" />
-    <NavigationProperty Name="ProductInOrders" Relationship="gr672_pgvModel.FK_ProductInOrder_ProductInStore" FromRole="ProductInStore" ToRole="ProductInOrder" />
-    <NavigationProperty Name="Store" Relationship="gr672_pgvModel.FK_ProductInStore_Store" FromRole="ProductInStore" ToRole="Store" />
-  </EntityType>
-  <Association Name="FK_PaymentOrder_Order">
-    <End Type="gr672_pgvModel.Order" Role="Order" Multiplicity="1" />
-    <End Type="gr672_pgvModel.PaymentOrder" Role="PaymentOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Order">
-        <PropertyRef Name="OrderID" />
-      </Principal>
-      <Dependent Role="PaymentOrder">
-        <PropertyRef Name="IDOrder" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_PaymentOrder_PaymentMetod">
-    <End Type="gr672_pgvModel.PaymentMetod" Role="PaymentMetod" Multiplicity="1" />
-    <End Type="gr672_pgvModel.PaymentOrder" Role="PaymentOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="PaymentMetod">
-        <PropertyRef Name="PaymentMetodID" />
-      </Principal>
-      <Dependent Role="PaymentOrder">
-        <PropertyRef Name="IDPaymentMetod" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInStore_Product">
-    <End Type="gr672_pgvModel.Product" Role="Product" Multiplicity="1" />
-    <End Type="gr672_pgvModel.ProductInStore" Role="ProductInStore" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Product">
-        <PropertyRef Name="ProductID" />
-      </Principal>
-      <Dependent Role="ProductInStore">
-        <PropertyRef Name="IDProduct" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInOrder_ProductInStore">
-    <End Type="gr672_pgvModel.ProductInStore" Role="ProductInStore" Multiplicity="1" />
-    <End Type="gr672_pgvModel.ProductInOrder" Role="ProductInOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="ProductInStore">
-        <PropertyRef Name="ProductInStoreID" />
-      </Principal>
-      <Dependent Role="ProductInOrder">
-        <PropertyRef Name="IDProduct" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInStore_Store">
-    <End Type="gr672_pgvModel.Store" Role="Store" Multiplicity="1" />
-    <End Type="gr672_pgvModel.ProductInStore" Role="ProductInStore" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Store">
-        <PropertyRef Name="StoreID" />
-      </Principal>
-      <Dependent Role="ProductInStore">
-        <PropertyRef Name="IDStore" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-</Schema>

+ 0 - 101
CentralServer/obj/Debug/edmxResourcesToEmbed/StoreModel.msl

@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
-  <EntityContainerMapping StorageEntityContainer="gr672_pgvModelStoreContainer" CdmEntityContainer="gr672_pgvEntities">
-    <EntitySetMapping Name="Employees">
-      <EntityTypeMapping TypeName="gr672_pgvModel.Employee">
-        <MappingFragment StoreEntitySet="Employee">
-          <ScalarProperty Name="Code" ColumnName="Code" />
-          <ScalarProperty Name="MiddleName" ColumnName="MiddleName" />
-          <ScalarProperty Name="Name" ColumnName="Name" />
-          <ScalarProperty Name="LastName" ColumnName="LastName" />
-          <ScalarProperty Name="EmployeeID" ColumnName="EmployeeID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="Orders">
-      <EntityTypeMapping TypeName="gr672_pgvModel.Order">
-        <MappingFragment StoreEntitySet="Order">
-          <ScalarProperty Name="State" ColumnName="State" />
-          <ScalarProperty Name="IDWorkShift" ColumnName="IDWorkShift" />
-          <ScalarProperty Name="Date" ColumnName="Date" />
-          <ScalarProperty Name="OrderID" ColumnName="OrderID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="PaymentMetods">
-      <EntityTypeMapping TypeName="gr672_pgvModel.PaymentMetod">
-        <MappingFragment StoreEntitySet="PaymentMetod">
-          <ScalarProperty Name="PaymentMetodName" ColumnName="PaymentMetodName" />
-          <ScalarProperty Name="PaymentMetodID" ColumnName="PaymentMetodID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="Products">
-      <EntityTypeMapping TypeName="gr672_pgvModel.Product">
-        <MappingFragment StoreEntitySet="Product">
-          <ScalarProperty Name="BarCode" ColumnName="BarCode" />
-          <ScalarProperty Name="PriceOfOne" ColumnName="PriceOfOne" />
-          <ScalarProperty Name="Packaging" ColumnName="Packaging" />
-          <ScalarProperty Name="Weight" ColumnName="Weight" />
-          <ScalarProperty Name="NameProduct" ColumnName="NameProduct" />
-          <ScalarProperty Name="ProductID" ColumnName="ProductID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="ProductInOrders">
-      <EntityTypeMapping TypeName="gr672_pgvModel.ProductInOrder">
-        <MappingFragment StoreEntitySet="ProductInOrder">
-          <ScalarProperty Name="AmountProduct" ColumnName="AmountProduct" />
-          <ScalarProperty Name="IDProduct" ColumnName="IDProduct" />
-          <ScalarProperty Name="IDOrder" ColumnName="IDOrder" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="Stores">
-      <EntityTypeMapping TypeName="gr672_pgvModel.Store">
-        <MappingFragment StoreEntitySet="Store">
-          <ScalarProperty Name="Address" ColumnName="Address" />
-          <ScalarProperty Name="StoreID" ColumnName="StoreID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="WorkShifts">
-      <EntityTypeMapping TypeName="gr672_pgvModel.WorkShift">
-        <MappingFragment StoreEntitySet="WorkShift">
-          <ScalarProperty Name="EndDateAndTimeWork" ColumnName="EndDateAndTimeWork" />
-          <ScalarProperty Name="StartDateAndTimeWork" ColumnName="StartDateAndTimeWork" />
-          <ScalarProperty Name="IDEmployee" ColumnName="IDEmployee" />
-          <ScalarProperty Name="IDCashier" ColumnName="IDCashier" />
-          <ScalarProperty Name="WorkShiftID" ColumnName="WorkShiftID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="Cashiers">
-      <EntityTypeMapping TypeName="gr672_pgvModel.Cashier">
-        <MappingFragment StoreEntitySet="Cashier">
-          <ScalarProperty Name="IDStore" ColumnName="IDStore" />
-          <ScalarProperty Name="CashierID" ColumnName="CashierID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="PaymentOrders">
-      <EntityTypeMapping TypeName="gr672_pgvModel.PaymentOrder">
-        <MappingFragment StoreEntitySet="PaymentOrder">
-          <ScalarProperty Name="IDOrder" ColumnName="IDOrder" />
-          <ScalarProperty Name="IDPaymentMetod" ColumnName="IDPaymentMetod" />
-          <ScalarProperty Name="PaymentID" ColumnName="PaymentID" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-    <EntitySetMapping Name="ProductInStores">
-      <EntityTypeMapping TypeName="gr672_pgvModel.ProductInStore">
-        <MappingFragment StoreEntitySet="ProductInStore">
-          <ScalarProperty Name="ProductInStoreID" ColumnName="ProductInStoreID" />
-          <ScalarProperty Name="RemainsProduct" ColumnName="RemainsProduct" />
-          <ScalarProperty Name="IDProduct" ColumnName="IDProduct" />
-          <ScalarProperty Name="IDStore" ColumnName="IDStore" />
-        </MappingFragment>
-      </EntityTypeMapping>
-    </EntitySetMapping>
-  </EntityContainerMapping>
-</Mapping>

+ 0 - 262
CentralServer/obj/Debug/edmxResourcesToEmbed/StoreModel.ssdl

@@ -1,262 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Schema Namespace="gr672_pgvModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
-  <EntityType Name="Cashier">
-    <Key>
-      <PropertyRef Name="CashierID" />
-    </Key>
-    <Property Name="CashierID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="IDStore" Type="int" Nullable="false" />
-  </EntityType>
-  <EntityType Name="Employee">
-    <Key>
-      <PropertyRef Name="EmployeeID" />
-    </Key>
-    <Property Name="EmployeeID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
-    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
-    <Property Name="MiddleName" Type="nvarchar" MaxLength="50" Nullable="false" />
-    <Property Name="Code" Type="nvarchar" MaxLength="5" Nullable="false" />
-  </EntityType>
-  <EntityType Name="Order">
-    <Key>
-      <PropertyRef Name="OrderID" />
-    </Key>
-    <Property Name="OrderID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="Date" Type="date" Nullable="false" />
-    <Property Name="IDWorkShift" Type="int" Nullable="false" />
-    <Property Name="State" Type="bit" Nullable="false" />
-  </EntityType>
-  <EntityType Name="PaymentMetod">
-    <Key>
-      <PropertyRef Name="PaymentMetodID" />
-    </Key>
-    <Property Name="PaymentMetodID" Type="int" Nullable="false" />
-    <Property Name="PaymentMetodName" Type="nvarchar" MaxLength="50" Nullable="false" />
-  </EntityType>
-  <EntityType Name="PaymentOrder">
-    <Key>
-      <PropertyRef Name="PaymentID" />
-    </Key>
-    <Property Name="PaymentID" Type="int" Nullable="false" />
-    <Property Name="IDPaymentMetod" Type="int" Nullable="false" />
-    <Property Name="IDOrder" Type="int" Nullable="false" />
-  </EntityType>
-  <EntityType Name="Product">
-    <Key>
-      <PropertyRef Name="ProductID" />
-    </Key>
-    <Property Name="ProductID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="NameProduct" Type="nvarchar(max)" Nullable="false" />
-    <Property Name="Weight" Type="int" Nullable="false" />
-    <Property Name="Packaging" Type="int" Nullable="false" />
-    <Property Name="PriceOfOne" Type="money" Nullable="false" />
-    <Property Name="BarCode" Type="nvarchar(max)" Nullable="false" />
-  </EntityType>
-  <EntityType Name="ProductInOrder">
-    <Key>
-      <PropertyRef Name="IDOrder" />
-      <PropertyRef Name="IDProduct" />
-    </Key>
-    <Property Name="IDOrder" Type="int" Nullable="false" />
-    <Property Name="IDProduct" Type="int" Nullable="false" />
-    <Property Name="AmountProduct" Type="int" Nullable="false" />
-  </EntityType>
-  <EntityType Name="ProductInStore">
-    <Key>
-      <PropertyRef Name="ProductInStoreID" />
-    </Key>
-    <Property Name="IDStore" Type="int" Nullable="false" />
-    <Property Name="IDProduct" Type="int" Nullable="false" />
-    <Property Name="RemainsProduct" Type="int" Nullable="false" />
-    <Property Name="ProductInStoreID" Type="int" Nullable="false" />
-  </EntityType>
-  <EntityType Name="Store">
-    <Key>
-      <PropertyRef Name="StoreID" />
-    </Key>
-    <Property Name="StoreID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-    <Property Name="Address" Type="nvarchar(max)" Nullable="false" />
-  </EntityType>
-  <EntityType Name="WorkShift">
-    <Key>
-      <PropertyRef Name="WorkShiftID" />
-    </Key>
-    <Property Name="WorkShiftID" Type="int" Nullable="false" />
-    <Property Name="IDCashier" Type="int" Nullable="false" />
-    <Property Name="IDEmployee" Type="int" Nullable="false" />
-    <Property Name="StartDateAndTimeWork" Type="datetime" Nullable="false" />
-    <Property Name="EndDateAndTimeWork" Type="datetime" />
-  </EntityType>
-  <Association Name="FK_Cashier_Store">
-    <End Role="Store" Type="Self.Store" Multiplicity="1" />
-    <End Role="Cashier" Type="Self.Cashier" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Store">
-        <PropertyRef Name="StoreID" />
-      </Principal>
-      <Dependent Role="Cashier">
-        <PropertyRef Name="IDStore" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_Order_WorkShift">
-    <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="1" />
-    <End Role="Order" Type="Self.Order" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="WorkShift">
-        <PropertyRef Name="WorkShiftID" />
-      </Principal>
-      <Dependent Role="Order">
-        <PropertyRef Name="IDWorkShift" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_PaymentOrder_Order">
-    <End Role="Order" Type="Self.Order" Multiplicity="1" />
-    <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Order">
-        <PropertyRef Name="OrderID" />
-      </Principal>
-      <Dependent Role="PaymentOrder">
-        <PropertyRef Name="IDOrder" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_PaymentOrder_PaymentMetod">
-    <End Role="PaymentMetod" Type="Self.PaymentMetod" Multiplicity="1" />
-    <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="PaymentMetod">
-        <PropertyRef Name="PaymentMetodID" />
-      </Principal>
-      <Dependent Role="PaymentOrder">
-        <PropertyRef Name="IDPaymentMetod" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInOrder_Order">
-    <End Role="Order" Type="Self.Order" Multiplicity="1" />
-    <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Order">
-        <PropertyRef Name="OrderID" />
-      </Principal>
-      <Dependent Role="ProductInOrder">
-        <PropertyRef Name="IDOrder" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInOrder_ProductInStore">
-    <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="1" />
-    <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="ProductInStore">
-        <PropertyRef Name="ProductInStoreID" />
-      </Principal>
-      <Dependent Role="ProductInOrder">
-        <PropertyRef Name="IDProduct" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInStore_Product">
-    <End Role="Product" Type="Self.Product" Multiplicity="1" />
-    <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Product">
-        <PropertyRef Name="ProductID" />
-      </Principal>
-      <Dependent Role="ProductInStore">
-        <PropertyRef Name="IDProduct" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_ProductInStore_Store">
-    <End Role="Store" Type="Self.Store" Multiplicity="1" />
-    <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Store">
-        <PropertyRef Name="StoreID" />
-      </Principal>
-      <Dependent Role="ProductInStore">
-        <PropertyRef Name="IDStore" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_WorkShift_Cashier">
-    <End Role="Cashier" Type="Self.Cashier" Multiplicity="1" />
-    <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Cashier">
-        <PropertyRef Name="CashierID" />
-      </Principal>
-      <Dependent Role="WorkShift">
-        <PropertyRef Name="IDCashier" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <Association Name="FK_WorkShift_Employee">
-    <End Role="Employee" Type="Self.Employee" Multiplicity="1" />
-    <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Employee">
-        <PropertyRef Name="EmployeeID" />
-      </Principal>
-      <Dependent Role="WorkShift">
-        <PropertyRef Name="IDEmployee" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
-  <EntityContainer Name="gr672_pgvModelStoreContainer">
-    <EntitySet Name="Cashier" EntityType="Self.Cashier" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="Employee" EntityType="Self.Employee" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="Order" EntityType="Self.Order" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="PaymentMetod" EntityType="Self.PaymentMetod" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="PaymentOrder" EntityType="Self.PaymentOrder" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="ProductInOrder" EntityType="Self.ProductInOrder" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="ProductInStore" EntityType="Self.ProductInStore" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="Store" EntityType="Self.Store" Schema="dbo" store:Type="Tables" />
-    <EntitySet Name="WorkShift" EntityType="Self.WorkShift" Schema="dbo" store:Type="Tables" />
-    <AssociationSet Name="FK_Cashier_Store" Association="Self.FK_Cashier_Store">
-      <End Role="Store" EntitySet="Store" />
-      <End Role="Cashier" EntitySet="Cashier" />
-    </AssociationSet>
-    <AssociationSet Name="FK_Order_WorkShift" Association="Self.FK_Order_WorkShift">
-      <End Role="WorkShift" EntitySet="WorkShift" />
-      <End Role="Order" EntitySet="Order" />
-    </AssociationSet>
-    <AssociationSet Name="FK_PaymentOrder_Order" Association="Self.FK_PaymentOrder_Order">
-      <End Role="Order" EntitySet="Order" />
-      <End Role="PaymentOrder" EntitySet="PaymentOrder" />
-    </AssociationSet>
-    <AssociationSet Name="FK_PaymentOrder_PaymentMetod" Association="Self.FK_PaymentOrder_PaymentMetod">
-      <End Role="PaymentMetod" EntitySet="PaymentMetod" />
-      <End Role="PaymentOrder" EntitySet="PaymentOrder" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInOrder_Order" Association="Self.FK_ProductInOrder_Order">
-      <End Role="Order" EntitySet="Order" />
-      <End Role="ProductInOrder" EntitySet="ProductInOrder" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInOrder_ProductInStore" Association="Self.FK_ProductInOrder_ProductInStore">
-      <End Role="ProductInStore" EntitySet="ProductInStore" />
-      <End Role="ProductInOrder" EntitySet="ProductInOrder" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInStore_Product" Association="Self.FK_ProductInStore_Product">
-      <End Role="Product" EntitySet="Product" />
-      <End Role="ProductInStore" EntitySet="ProductInStore" />
-    </AssociationSet>
-    <AssociationSet Name="FK_ProductInStore_Store" Association="Self.FK_ProductInStore_Store">
-      <End Role="Store" EntitySet="Store" />
-      <End Role="ProductInStore" EntitySet="ProductInStore" />
-    </AssociationSet>
-    <AssociationSet Name="FK_WorkShift_Cashier" Association="Self.FK_WorkShift_Cashier">
-      <End Role="Cashier" EntitySet="Cashier" />
-      <End Role="WorkShift" EntitySet="WorkShift" />
-    </AssociationSet>
-    <AssociationSet Name="FK_WorkShift_Employee" Association="Self.FK_WorkShift_Employee">
-      <End Role="Employee" EntitySet="Employee" />
-      <End Role="WorkShift" EntitySet="WorkShift" />
-    </AssociationSet>
-  </EntityContainer>
-</Schema>

+ 1 - 1
StoreServer/EmployeePartial.cs

@@ -12,7 +12,7 @@ namespace StoreServer
         {
             get
             {
-                return $"{LastName} {Name[0]} {MiddleName[0]}";
+                return $"{LastName} {Name[0]}. {MiddleName[0]}.";
             }
         }
     }

+ 1 - 1
StoreServer/ModelStore.Context.cs

@@ -33,8 +33,8 @@ namespace StoreServer
         public virtual DbSet<ProductInOrder> ProductInOrder { get; set; }
         public virtual DbSet<ProductInStore> ProductInStore { get; set; }
         public virtual DbSet<Store> Store { get; set; }
-        public virtual DbSet<WorkShift> WorkShift { get; set; }
         public virtual DbSet<Cashier> Cashier { get; set; }
         public virtual DbSet<EmployeeInStore> EmployeeInStore { get; set; }
+        public virtual DbSet<WorkShift> WorkShift { get; set; }
     }
 }

+ 60 - 60
StoreServer/ModelStore.edmx

@@ -94,10 +94,10 @@
           <Key>
             <PropertyRef Name="WorkShiftID" />
           </Key>
-          <Property Name="WorkShiftID" Type="int" Nullable="false" />
+          <Property Name="WorkShiftID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
           <Property Name="IDCashier" Type="int" Nullable="false" />
           <Property Name="IDEmployee" Type="int" Nullable="false" />
-          <Property Name="StartDateAndTimeWork" Type="datetime" Nullable="false" />
+          <Property Name="StartDateAndTimeWork" Type="datetime" />
           <Property Name="EndDateAndTimeWork" Type="datetime" />
         </EntityType>
         <Association Name="FK_Cashier_Store">
@@ -328,9 +328,9 @@
           <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
           <Property Name="IDWorkShift" Type="Int32" Nullable="false" />
           <Property Name="State" Type="Boolean" Nullable="false" />
-          <NavigationProperty Name="WorkShift" Relationship="Self.FK_Order_WorkShift" FromRole="Order" ToRole="WorkShift" />
           <NavigationProperty Name="PaymentOrder" Relationship="Self.FK_PaymentOrder_Order" FromRole="Order" ToRole="PaymentOrder" />
           <NavigationProperty Name="ProductInOrder" Relationship="Self.FK_ProductInOrder_Order" FromRole="Order" ToRole="ProductInOrder" />
+          <NavigationProperty Name="WorkShift" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="Order" ToRole="WorkShift" />
         </EntityType>
         <EntityType Name="PaymentMetod">
           <Key>
@@ -395,31 +395,6 @@
           <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_Cashier_Store" FromRole="Store" ToRole="Cashier" />
           <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_EmployeeInStore_Store" FromRole="Store" ToRole="EmployeeInStore" />
         </EntityType>
-        <EntityType Name="WorkShift">
-          <Key>
-            <PropertyRef Name="WorkShiftID" />
-          </Key>
-          <Property Name="WorkShiftID" Type="Int32" Nullable="false" />
-          <Property Name="IDCashier" Type="Int32" Nullable="false" />
-          <Property Name="IDEmployee" Type="Int32" Nullable="false" />
-          <Property Name="StartDateAndTimeWork" Type="DateTime" Nullable="false" Precision="3" />
-          <Property Name="EndDateAndTimeWork" Type="DateTime" Precision="3" />
-          <NavigationProperty Name="Order" Relationship="Self.FK_Order_WorkShift" FromRole="WorkShift" ToRole="Order" />
-          <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="WorkShift" ToRole="Cashier" />
-          <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_WorkShift_EmployeeInStore" FromRole="WorkShift" ToRole="EmployeeInStore" />
-        </EntityType>
-        <Association Name="FK_Order_WorkShift">
-          <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="1" />
-          <End Role="Order" Type="Self.Order" Multiplicity="*" />
-          <ReferentialConstraint>
-            <Principal Role="WorkShift">
-              <PropertyRef Name="WorkShiftID" />
-            </Principal>
-            <Dependent Role="Order">
-              <PropertyRef Name="IDWorkShift" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
         <Association Name="FK_PaymentOrder_Order">
           <End Role="Order" Type="Self.Order" Multiplicity="1" />
           <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
@@ -501,11 +476,6 @@
           <EntitySet Name="ProductInOrder" EntityType="Self.ProductInOrder" />
           <EntitySet Name="ProductInStore" EntityType="Self.ProductInStore" />
           <EntitySet Name="Store" EntityType="Self.Store" />
-          <EntitySet Name="WorkShift" EntityType="Self.WorkShift" />
-          <AssociationSet Name="FK_Order_WorkShift" Association="Self.FK_Order_WorkShift">
-            <End Role="WorkShift" EntitySet="WorkShift" />
-            <End Role="Order" EntitySet="Order" />
-          </AssociationSet>
           <AssociationSet Name="FK_PaymentOrder_Order" Association="Self.FK_PaymentOrder_Order">
             <End Role="Order" EntitySet="Order" />
             <End Role="PaymentOrder" EntitySet="PaymentOrder" />
@@ -535,10 +505,6 @@
             <End Role="Store" EntitySet="Store" />
             <End Role="Cashier" EntitySet="Cashier" />
           </AssociationSet>
-          <AssociationSet Name="FK_WorkShift_Cashier" Association="gr672_pgvModel.FK_WorkShift_Cashier">
-            <End Role="Cashier" EntitySet="Cashier" />
-            <End Role="WorkShift" EntitySet="WorkShift" />
-          </AssociationSet>
           <EntitySet Name="EmployeeInStore" EntityType="gr672_pgvModel.EmployeeInStore" />
           <AssociationSet Name="FK_EmployeeInStore_Employee" Association="gr672_pgvModel.FK_EmployeeInStore_Employee">
             <End Role="Employee" EntitySet="Employee" />
@@ -548,10 +514,19 @@
             <End Role="Store" EntitySet="Store" />
             <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
           </AssociationSet>
+          <EntitySet Name="WorkShift" EntityType="gr672_pgvModel.WorkShift" />
+          <AssociationSet Name="FK_WorkShift_Cashier" Association="gr672_pgvModel.FK_WorkShift_Cashier">
+            <End Role="Cashier" EntitySet="Cashier" />
+            <End Role="WorkShift" EntitySet="WorkShift" />
+          </AssociationSet>
           <AssociationSet Name="FK_WorkShift_EmployeeInStore" Association="gr672_pgvModel.FK_WorkShift_EmployeeInStore">
             <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
             <End Role="WorkShift" EntitySet="WorkShift" />
           </AssociationSet>
+          <AssociationSet Name="FK_Order_WorkShift" Association="gr672_pgvModel.FK_Order_WorkShift">
+            <End Role="WorkShift" EntitySet="WorkShift" />
+            <End Role="Order" EntitySet="Order" />
+          </AssociationSet>
         </EntityContainer>
         <EntityType Name="Cashier">
           <Key>
@@ -574,18 +549,6 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="FK_WorkShift_Cashier">
-          <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="1" />
-          <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
-          <ReferentialConstraint>
-            <Principal Role="Cashier">
-              <PropertyRef Name="CashierID" />
-            </Principal>
-            <Dependent Role="WorkShift">
-              <PropertyRef Name="IDCashier" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
         <EntityType Name="EmployeeInStore">
           <Key>
             <PropertyRef Name="IDEmployeeInStore" />
@@ -621,6 +584,31 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <EntityType Name="WorkShift">
+          <Key>
+            <PropertyRef Name="WorkShiftID" />
+          </Key>
+          <Property Name="WorkShiftID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="IDCashier" Type="Int32" Nullable="false" />
+          <Property Name="IDEmployee" Type="Int32" Nullable="false" />
+          <Property Name="StartDateAndTimeWork" Type="DateTime" Precision="3" />
+          <Property Name="EndDateAndTimeWork" Type="DateTime" Precision="3" />
+          <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="WorkShift" ToRole="Cashier" />
+          <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_WorkShift_EmployeeInStore" FromRole="WorkShift" ToRole="EmployeeInStore" />
+          <NavigationProperty Name="Order" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="WorkShift" ToRole="Order" />
+        </EntityType>
+        <Association Name="FK_WorkShift_Cashier">
+          <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="1" />
+          <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Cashier">
+              <PropertyRef Name="CashierID" />
+            </Principal>
+            <Dependent Role="WorkShift">
+              <PropertyRef Name="IDCashier" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <Association Name="FK_WorkShift_EmployeeInStore">
           <End Type="gr672_pgvModel.EmployeeInStore" Role="EmployeeInStore" Multiplicity="1" />
           <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
@@ -633,6 +621,18 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <Association Name="FK_Order_WorkShift">
+          <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="1" />
+          <End Type="gr672_pgvModel.Order" Role="Order" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="WorkShift">
+              <PropertyRef Name="WorkShiftID" />
+            </Principal>
+            <Dependent Role="Order">
+              <PropertyRef Name="IDWorkShift" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -716,17 +716,6 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
-          <EntitySetMapping Name="WorkShift">
-            <EntityTypeMapping TypeName="gr672_pgvModel.WorkShift">
-              <MappingFragment StoreEntitySet="WorkShift">
-                <ScalarProperty Name="WorkShiftID" ColumnName="WorkShiftID" />
-                <ScalarProperty Name="IDCashier" ColumnName="IDCashier" />
-                <ScalarProperty Name="IDEmployee" ColumnName="IDEmployee" />
-                <ScalarProperty Name="StartDateAndTimeWork" ColumnName="StartDateAndTimeWork" />
-                <ScalarProperty Name="EndDateAndTimeWork" ColumnName="EndDateAndTimeWork" />
-              </MappingFragment>
-            </EntityTypeMapping>
-          </EntitySetMapping>
           <EntitySetMapping Name="Cashier">
             <EntityTypeMapping TypeName="gr672_pgvModel.Cashier">
               <MappingFragment StoreEntitySet="Cashier">
@@ -744,6 +733,17 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
+          <EntitySetMapping Name="WorkShift">
+            <EntityTypeMapping TypeName="gr672_pgvModel.WorkShift">
+              <MappingFragment StoreEntitySet="WorkShift">
+                <ScalarProperty Name="EndDateAndTimeWork" ColumnName="EndDateAndTimeWork" />
+                <ScalarProperty Name="StartDateAndTimeWork" ColumnName="StartDateAndTimeWork" />
+                <ScalarProperty Name="IDEmployee" ColumnName="IDEmployee" />
+                <ScalarProperty Name="IDCashier" ColumnName="IDCashier" />
+                <ScalarProperty Name="WorkShiftID" ColumnName="WorkShiftID" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
         </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>

+ 3 - 3
StoreServer/ModelStore.edmx.diagram

@@ -13,8 +13,6 @@
         <EntityTypeShape EntityType="gr672_pgvModel.ProductInOrder" Width="1.5" PointX="9.75" PointY="0.75" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_pgvModel.ProductInStore" Width="1.5" PointX="3" PointY="1" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_pgvModel.Store" Width="1.5" PointX="0.75" PointY="4.375" IsExpanded="true" />
-        <EntityTypeShape EntityType="gr672_pgvModel.WorkShift" Width="1.5" PointX="5.25" PointY="4" IsExpanded="true" />
-        <AssociationConnector Association="gr672_pgvModel.FK_Order_WorkShift" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_pgvModel.FK_PaymentOrder_Order" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_pgvModel.FK_ProductInOrder_Order" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_pgvModel.FK_PaymentOrder_PaymentMetod" ManuallyRouted="false" />
@@ -23,11 +21,13 @@
         <AssociationConnector Association="gr672_pgvModel.FK_ProductInStore_Store" ManuallyRouted="false" />
         <EntityTypeShape EntityType="gr672_pgvModel.Cashier" Width="1.5" PointX="3" PointY="7.5" />
         <AssociationConnector Association="gr672_pgvModel.FK_Cashier_Store" />
-        <AssociationConnector Association="gr672_pgvModel.FK_WorkShift_Cashier" />
         <EntityTypeShape EntityType="gr672_pgvModel.EmployeeInStore" Width="1.5" PointX="6" PointY="7.75" />
         <AssociationConnector Association="gr672_pgvModel.FK_EmployeeInStore_Employee" />
         <AssociationConnector Association="gr672_pgvModel.FK_EmployeeInStore_Store" />
+        <EntityTypeShape EntityType="gr672_pgvModel.WorkShift" Width="1.5" PointX="8.25" PointY="7.375" />
+        <AssociationConnector Association="gr672_pgvModel.FK_WorkShift_Cashier" />
         <AssociationConnector Association="gr672_pgvModel.FK_WorkShift_EmployeeInStore" />
+        <AssociationConnector Association="gr672_pgvModel.FK_Order_WorkShift" />
       </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 22 - 9
StoreServer/MonitoringCashierPage.xaml

@@ -9,14 +9,27 @@
       Title="Состояние касс">
 
     <Grid>
-        <DataGrid x:Name="ListCashier" AutoGenerateColumns="False">
-            <DataGrid.Columns>
-                <DataGridTextColumn Header="Номер кассы" Binding="{Binding Cashier.CashierID}"></DataGridTextColumn>
-                <DataGridTextColumn Header="Статус" Binding="{Binding IsStartCashier}"></DataGridTextColumn>
-                <DataGridTextColumn Header="Кассир" Binding="{Binding EmployeeInStore.Employee.FullName}"></DataGridTextColumn>
-                <DataGridTextColumn Header="Состояние смены" Binding="{Binding IsStartCashier}"></DataGridTextColumn>
-                
-            </DataGrid.Columns>
-        </DataGrid>
+        <TabControl>
+            <TabItem Header="Состояния касс">
+                <TabControl>
+                    <Grid>
+                        <DataGrid x:Name="ListCashier" AutoGenerateColumns="False">
+                            <DataGrid.Columns>
+                                <DataGridTextColumn Header="Номер кассы" Binding="{Binding Cashier.CashierID}"></DataGridTextColumn>
+                                <DataGridTextColumn Header="Статус" Binding="{Binding IsStartCashier}"></DataGridTextColumn>
+                                <DataGridTextColumn Header="Кассир" Binding="{Binding EmployeeInStore.Employee.FullName}"></DataGridTextColumn>
+                                <DataGridTextColumn Header="Состояние смены" Binding="{Binding IsStartWorkShift}"></DataGridTextColumn>
+                            </DataGrid.Columns>
+                        </DataGrid>
+                    </Grid>
+                </TabControl>
+            </TabItem>
+            <TabItem Header="Отчёты">
+                <Grid>
+                    
+                </Grid>
+            </TabItem>
+        </TabControl>
+        
     </Grid>
 </Page>

+ 38 - 5
StoreServer/MonitoringCashierPage.xaml.cs

@@ -45,15 +45,23 @@ namespace StoreServer
         public void StartWorkCashier(int CashierID, EmployeeInStore AuthEmployee)
         {
             var CurrentWorkShift = WorkShiftOnCashier.FirstOrDefault(x => x.Cashier.CashierID == CashierID);
-            CurrentWorkShift.StartDateAndTimeWork = DateTime.Now;
             CurrentWorkShift.EmployeeInStore = AuthEmployee;
             ListCashier.ItemsSource = null;
             ListCashier.ItemsSource = WorkShiftOnCashier;
         }
 
+        public void StartWorkShift(int CashierID)
+        {
+            var CurrentWorkShift = WorkShiftOnCashier.FirstOrDefault(x => x.Cashier.CashierID == CashierID);
+            CurrentWorkShift.StartDateAndTimeWork = DateTime.Now;
+            ListCashier.ItemsSource = null;
+            ListCashier.ItemsSource = WorkShiftOnCashier;
+        }
+
         public async void StartSocketServer()
         {
             string IDStore = Helper.FindStore.StoreID.ToString();
+            if (IDStore.Length == 1) IDStore = IDStore.Insert(0, "0");
             IPEndPoint iPEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), Convert.ToInt32("102" + IDStore));
             Socket Listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
             Listener.Bind(iPEndPoint);
@@ -70,7 +78,7 @@ namespace StoreServer
                     stringBuilder = stringBuilder.Append(Encoding.UTF8.GetString(data, 0, bytes));
                 } while (SocketClient.Available >0);
                 string Message = stringBuilder.ToString();
-                if (Message.Contains("Code cashier="))
+                if (Message.Contains("Authorization - Code cashier="))
                 {
                     int NumberCashier = Convert.ToInt32(Message.Split(';')[0].Split('=')[1]);
                     var FindCashier = DB.db.Cashier.FirstOrDefault(x => x.IDStore == Helper.FindStore.StoreID && x.CashierID == NumberCashier);
@@ -94,15 +102,40 @@ namespace StoreServer
                         }
                         else
                         {
-
                             StartWorkCashier(FindCashier.CashierID, FindEmployee);
-                            byte[] buffer = Encoding.UTF8.GetBytes("Добро пожаловать");
+                            List<RootDataOfProductInStore> dataOfProductInStores = new List<RootDataOfProductInStore>();
+                            foreach (var item in Helper.FindStore.ProductInStore)
+                            {
+                                dataOfProductInStores.Add(new RootDataOfProductInStore
+                                {
+                                    ProductInStoreID = item.ProductInStoreID,
+                                    RemainsProduct = item.RemainsProduct,
+                                    NameProduct = item.Product.NameProduct,
+                                    Weight = item.Product.Weight,
+                                    Packaging = item.Product.Packaging,
+                                    PriceOfOne = item.Product.PriceOfOne,
+                                    BarCode = item.Product.BarCode
+                                });
+                            }
+                            string Json = JsonConvert.SerializeObject(dataOfProductInStores);
+                            byte[] buffer = Encoding.UTF8.GetBytes("Добро пожаловать =" + Json);
                             SocketClient.Send(buffer);
                             SocketClient.Shutdown(SocketShutdown.Both);
                             SocketClient.Close();
                         }
                     }
-
+                }
+                if (Message.Contains("Start work shift ="))
+                {
+                    int CashierID = Convert.ToInt32(Message.Split('=')[1]);
+                    StartWorkShift(CashierID);
+                    var CurrentWorkShift = WorkShiftOnCashier.FirstOrDefault(x => x.Cashier.CashierID == CashierID);
+                    DB.db.WorkShift.Add(CurrentWorkShift);
+                    DB.db.SaveChanges();
+                    byte[] buffer = Encoding.UTF8.GetBytes(CurrentWorkShift.WorkShiftID.ToString());
+                    SocketClient.Send(buffer);
+                    SocketClient.Shutdown(SocketShutdown.Both);
+                    SocketClient.Close();
                 }
             }
         } 

+ 1 - 1
StoreServer/Order.cs

@@ -26,10 +26,10 @@ namespace StoreServer
         public int IDWorkShift { get; set; }
         public bool State { get; set; }
     
-        public virtual WorkShift WorkShift { get; set; }
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<PaymentOrder> PaymentOrder { get; set; }
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<ProductInOrder> ProductInOrder { get; set; }
+        public virtual WorkShift WorkShift { get; set; }
     }
 }

+ 19 - 0
StoreServer/RootDataOfProductInStore.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StoreServer
+{
+    public class RootDataOfProductInStore
+    {
+        public int ProductInStoreID { get; set; }
+        public string NameProduct { get; set; }
+        public int Weight { get; set; }
+        public int Packaging { get; set; }
+        public decimal PriceOfOne { get; set; }
+        public string BarCode { get; set; }
+        public int RemainsProduct { get; set; }
+    }
+}

+ 1 - 0
StoreServer/StoreServer.csproj

@@ -115,6 +115,7 @@
     <Compile Include="ProductInStore.cs">
       <DependentUpon>ModelStore.tt</DependentUpon>
     </Compile>
+    <Compile Include="RootDataOfProductInStore.cs" />
     <Compile Include="StartWorkPage.xaml.cs">
       <DependentUpon>StartWorkPage.xaml</DependentUpon>
     </Compile>

+ 2 - 2
StoreServer/WorkShift.cs

@@ -26,9 +26,9 @@ namespace StoreServer
         public Nullable<System.DateTime> StartDateAndTimeWork { get; set; }
         public Nullable<System.DateTime> EndDateAndTimeWork { get; set; }
     
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
-        public virtual ICollection<Order> Order { get; set; }
         public virtual Cashier Cashier { get; set; }
         public virtual EmployeeInStore EmployeeInStore { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<Order> Order { get; set; }
     }
 }

+ 12 - 3
StoreServer/WorkShiftPartial.cs

@@ -12,10 +12,19 @@ namespace StoreServer
         {
             get
             {
-                if (StartDateAndTimeWork == null) return "Не запущена";
-                if (StartDateAndTimeWork != null && EndDateAndTimeWork != null) return "Закончена"; 
+                if (EmployeeInStore == null) return "Не запущена";
+                return "Запущена";
+            }
+        }
+
+        public string IsStartWorkShift
+        {
+            get
+            {
+                if (StartDateAndTimeWork == null) return "Не начата";
+                if (StartDateAndTimeWork != null && EndDateAndTimeWork != null) return "Закончена";
                 return "Работает";
             }
         }
-   }
+    }
 }

BIN
StoreServer/bin/Debug/StoreServer.exe


BIN
StoreServer/bin/Debug/StoreServer.pdb


BIN
StoreServer/obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
StoreServer/obj/Debug/MonitoringCashierPage.baml


+ 2 - 2
StoreServer/obj/Debug/MonitoringCashierPage.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MonitoringCashierPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "08B3EB69E094C990532566CD0A3FC58478714644C57CEEC4587D298A5CC05751"
+#pragma checksum "..\..\MonitoringCashierPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "54BC7F19BFF825FEB6719E7C759D341B9F94A25A24B8F965DA1A74C5BDB51D50"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
@@ -41,7 +41,7 @@ namespace StoreServer {
     public partial class MonitoringCashierPage : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
         
         
-        #line 12 "..\..\MonitoringCashierPage.xaml"
+        #line 16 "..\..\MonitoringCashierPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.DataGrid ListCashier;
         

+ 2 - 2
StoreServer/obj/Debug/MonitoringCashierPage.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MonitoringCashierPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "08B3EB69E094C990532566CD0A3FC58478714644C57CEEC4587D298A5CC05751"
+#pragma checksum "..\..\MonitoringCashierPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "54BC7F19BFF825FEB6719E7C759D341B9F94A25A24B8F965DA1A74C5BDB51D50"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
@@ -41,7 +41,7 @@ namespace StoreServer {
     public partial class MonitoringCashierPage : System.Windows.Controls.Page, System.Windows.Markup.IComponentConnector {
         
         
-        #line 12 "..\..\MonitoringCashierPage.xaml"
+        #line 16 "..\..\MonitoringCashierPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.DataGrid ListCashier;
         

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

@@ -1 +1 @@
-8ef53724f771c88234a2048cdb68f4f0251fee03
+9fc82effdaee8cec17d6646aa837f70288735117

BIN
StoreServer/obj/Debug/StoreServer.csprojAssemblyReference.cache


BIN
StoreServer/obj/Debug/StoreServer.exe


BIN
StoreServer/obj/Debug/StoreServer.g.resources


BIN
StoreServer/obj/Debug/StoreServer.pdb


+ 1 - 1
StoreServer/obj/Debug/StoreServer_MarkupCompile.cache

@@ -12,7 +12,7 @@ DEBUG;TRACE
 C:\Users\gr672_pgv\source\repos\StoreAllProject\StoreServer\App.xaml
 31785628841
 2484076859
-26-811147218
+27692683996
 19-1590967236
 MainWindow.xaml;MonitoringCashierPage.xaml;StartWorkPage.xaml;
 

+ 2 - 2
StoreServer/obj/Debug/StoreServer_MarkupCompile.i.cache

@@ -12,9 +12,9 @@ DEBUG;TRACE
 C:\Users\gr672_pgv\source\repos\StoreAllProject\StoreServer\App.xaml
 31785628841
 2484076859
-27-1653506585
+28-149675371
 19-1590967236
 MainWindow.xaml;MonitoringCashierPage.xaml;StartWorkPage.xaml;
 
-False
+True
 

+ 4 - 0
StoreServer/obj/Debug/StoreServer_MarkupCompile.i.lref

@@ -0,0 +1,4 @@
+
+
+FC:\Users\gr672_pgv\source\repos\StoreAllProject\StoreServer\MonitoringCashierPage.xaml;;
+

BIN
StoreServer/obj/Debug/TempPE/ModelStore.Designer.cs.dll


BIN
StoreServer/obj/Debug/TempPE/ModelStore.cs.dll


+ 47 - 47
StoreServer/obj/Debug/edmxResourcesToEmbed/ModelStore.csdl

@@ -19,9 +19,9 @@
     <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
     <Property Name="IDWorkShift" Type="Int32" Nullable="false" />
     <Property Name="State" Type="Boolean" Nullable="false" />
-    <NavigationProperty Name="WorkShift" Relationship="Self.FK_Order_WorkShift" FromRole="Order" ToRole="WorkShift" />
     <NavigationProperty Name="PaymentOrder" Relationship="Self.FK_PaymentOrder_Order" FromRole="Order" ToRole="PaymentOrder" />
     <NavigationProperty Name="ProductInOrder" Relationship="Self.FK_ProductInOrder_Order" FromRole="Order" ToRole="ProductInOrder" />
+    <NavigationProperty Name="WorkShift" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="Order" ToRole="WorkShift" />
   </EntityType>
   <EntityType Name="PaymentMetod">
     <Key>
@@ -86,31 +86,6 @@
     <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_Cashier_Store" FromRole="Store" ToRole="Cashier" />
     <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_EmployeeInStore_Store" FromRole="Store" ToRole="EmployeeInStore" />
   </EntityType>
-  <EntityType Name="WorkShift">
-    <Key>
-      <PropertyRef Name="WorkShiftID" />
-    </Key>
-    <Property Name="WorkShiftID" Type="Int32" Nullable="false" />
-    <Property Name="IDCashier" Type="Int32" Nullable="false" />
-    <Property Name="IDEmployee" Type="Int32" Nullable="false" />
-    <Property Name="StartDateAndTimeWork" Type="DateTime" Nullable="false" Precision="3" />
-    <Property Name="EndDateAndTimeWork" Type="DateTime" Precision="3" />
-    <NavigationProperty Name="Order" Relationship="Self.FK_Order_WorkShift" FromRole="WorkShift" ToRole="Order" />
-    <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="WorkShift" ToRole="Cashier" />
-    <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_WorkShift_EmployeeInStore" FromRole="WorkShift" ToRole="EmployeeInStore" />
-  </EntityType>
-  <Association Name="FK_Order_WorkShift">
-    <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="1" />
-    <End Role="Order" Type="Self.Order" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="WorkShift">
-        <PropertyRef Name="WorkShiftID" />
-      </Principal>
-      <Dependent Role="Order">
-        <PropertyRef Name="IDWorkShift" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
   <Association Name="FK_PaymentOrder_Order">
     <End Role="Order" Type="Self.Order" Multiplicity="1" />
     <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
@@ -192,11 +167,6 @@
     <EntitySet Name="ProductInOrder" EntityType="Self.ProductInOrder" />
     <EntitySet Name="ProductInStore" EntityType="Self.ProductInStore" />
     <EntitySet Name="Store" EntityType="Self.Store" />
-    <EntitySet Name="WorkShift" EntityType="Self.WorkShift" />
-    <AssociationSet Name="FK_Order_WorkShift" Association="Self.FK_Order_WorkShift">
-      <End Role="WorkShift" EntitySet="WorkShift" />
-      <End Role="Order" EntitySet="Order" />
-    </AssociationSet>
     <AssociationSet Name="FK_PaymentOrder_Order" Association="Self.FK_PaymentOrder_Order">
       <End Role="Order" EntitySet="Order" />
       <End Role="PaymentOrder" EntitySet="PaymentOrder" />
@@ -226,10 +196,6 @@
       <End Role="Store" EntitySet="Store" />
       <End Role="Cashier" EntitySet="Cashier" />
     </AssociationSet>
-    <AssociationSet Name="FK_WorkShift_Cashier" Association="gr672_pgvModel.FK_WorkShift_Cashier">
-      <End Role="Cashier" EntitySet="Cashier" />
-      <End Role="WorkShift" EntitySet="WorkShift" />
-    </AssociationSet>
     <EntitySet Name="EmployeeInStore" EntityType="gr672_pgvModel.EmployeeInStore" />
     <AssociationSet Name="FK_EmployeeInStore_Employee" Association="gr672_pgvModel.FK_EmployeeInStore_Employee">
       <End Role="Employee" EntitySet="Employee" />
@@ -239,10 +205,19 @@
       <End Role="Store" EntitySet="Store" />
       <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
     </AssociationSet>
+    <EntitySet Name="WorkShift" EntityType="gr672_pgvModel.WorkShift" />
+    <AssociationSet Name="FK_WorkShift_Cashier" Association="gr672_pgvModel.FK_WorkShift_Cashier">
+      <End Role="Cashier" EntitySet="Cashier" />
+      <End Role="WorkShift" EntitySet="WorkShift" />
+    </AssociationSet>
     <AssociationSet Name="FK_WorkShift_EmployeeInStore" Association="gr672_pgvModel.FK_WorkShift_EmployeeInStore">
       <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
       <End Role="WorkShift" EntitySet="WorkShift" />
     </AssociationSet>
+    <AssociationSet Name="FK_Order_WorkShift" Association="gr672_pgvModel.FK_Order_WorkShift">
+      <End Role="WorkShift" EntitySet="WorkShift" />
+      <End Role="Order" EntitySet="Order" />
+    </AssociationSet>
   </EntityContainer>
   <EntityType Name="Cashier">
     <Key>
@@ -265,18 +240,6 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
-  <Association Name="FK_WorkShift_Cashier">
-    <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="1" />
-    <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
-    <ReferentialConstraint>
-      <Principal Role="Cashier">
-        <PropertyRef Name="CashierID" />
-      </Principal>
-      <Dependent Role="WorkShift">
-        <PropertyRef Name="IDCashier" />
-      </Dependent>
-    </ReferentialConstraint>
-  </Association>
   <EntityType Name="EmployeeInStore">
     <Key>
       <PropertyRef Name="IDEmployeeInStore" />
@@ -312,6 +275,31 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
+  <EntityType Name="WorkShift">
+    <Key>
+      <PropertyRef Name="WorkShiftID" />
+    </Key>
+    <Property Name="WorkShiftID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="IDCashier" Type="Int32" Nullable="false" />
+    <Property Name="IDEmployee" Type="Int32" Nullable="false" />
+    <Property Name="StartDateAndTimeWork" Type="DateTime" Precision="3" />
+    <Property Name="EndDateAndTimeWork" Type="DateTime" Precision="3" />
+    <NavigationProperty Name="Cashier" Relationship="gr672_pgvModel.FK_WorkShift_Cashier" FromRole="WorkShift" ToRole="Cashier" />
+    <NavigationProperty Name="EmployeeInStore" Relationship="gr672_pgvModel.FK_WorkShift_EmployeeInStore" FromRole="WorkShift" ToRole="EmployeeInStore" />
+    <NavigationProperty Name="Order" Relationship="gr672_pgvModel.FK_Order_WorkShift" FromRole="WorkShift" ToRole="Order" />
+  </EntityType>
+  <Association Name="FK_WorkShift_Cashier">
+    <End Type="gr672_pgvModel.Cashier" Role="Cashier" Multiplicity="1" />
+    <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Cashier">
+        <PropertyRef Name="CashierID" />
+      </Principal>
+      <Dependent Role="WorkShift">
+        <PropertyRef Name="IDCashier" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
   <Association Name="FK_WorkShift_EmployeeInStore">
     <End Type="gr672_pgvModel.EmployeeInStore" Role="EmployeeInStore" Multiplicity="1" />
     <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="*" />
@@ -324,4 +312,16 @@
       </Dependent>
     </ReferentialConstraint>
   </Association>
+  <Association Name="FK_Order_WorkShift">
+    <End Type="gr672_pgvModel.WorkShift" Role="WorkShift" Multiplicity="1" />
+    <End Type="gr672_pgvModel.Order" Role="Order" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="WorkShift">
+        <PropertyRef Name="WorkShiftID" />
+      </Principal>
+      <Dependent Role="Order">
+        <PropertyRef Name="IDWorkShift" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
 </Schema>

+ 0 - 0
StoreServer/obj/Debug/edmxResourcesToEmbed/ModelStore.msl


Some files were not shown because too many files changed in this diff