Postaldude 2 gadi atpakaļ
revīzija
2c7c0e4331
100 mainītis faili ar 24662 papildinājumiem un 0 dzēšanām
  1. 11 0
      .vs/OUP/project-colors.json
  2. BIN
      .vs/OUP/v16/.suo
  3. BIN
      .vs/OUP/v17/.suo
  4. 3 0
      .vs/ProjectSettings.json
  5. 8 0
      .vs/VSWorkspaceState.json
  6. BIN
      .vs/slnx.sqlite
  7. 25 0
      OUP.sln
  8. 26 0
      OUP/Address.cs
  9. 61 0
      OUP/App.config
  10. 9 0
      OUP/App.xaml
  11. 21 0
      OUP/App.xaml.cs
  12. 20 0
      OUP/BaseViewModel.cs
  13. 24 0
      OUP/CardAmount.cs
  14. 24 0
      OUP/Cash.cs
  15. 30 0
      OUP/CashRegister.cs
  16. 112 0
      OUP/ClassMain.cs
  17. 22 0
      OUP/Context.cs
  18. 27 0
      OUP/Dates.cs
  19. 41 0
      OUP/Employees.cs
  20. 62 0
      OUP/ForOUP/Descriptions.cs
  21. 20 0
      OUP/Helper.cs
  22. 64 0
      OUP/MainViewModel.cs
  23. 43 0
      OUP/MainWindow.xaml
  24. 34 0
      OUP/MainWindow.xaml.cs
  25. 43 0
      OUP/Model1.Context.cs
  26. 735 0
      OUP/Model1.Context.tt
  27. 10 0
      OUP/Model1.Designer.cs
  28. 9 0
      OUP/Model1.cs
  29. 935 0
      OUP/Model1.edmx
  30. 38 0
      OUP/Model1.edmx.diagram
  31. 845 0
      OUP/Model1.tt
  32. 342 0
      OUP/OUP.csproj
  33. 20 0
      OUP/OUP.xaml
  34. 70 0
      OUP/OUP.xaml.cs
  35. 25 0
      OUP/PasportDetails.cs
  36. 31 0
      OUP/Payment.cs
  37. 39 0
      OUP/Product.cs
  38. 17 0
      OUP/Product2.cs
  39. 55 0
      OUP/Properties/AssemblyInfo.cs
  40. 63 0
      OUP/Properties/Resources.Designer.cs
  41. 117 0
      OUP/Properties/Resources.resx
  42. 26 0
      OUP/Properties/Settings.Designer.cs
  43. 7 0
      OUP/Properties/Settings.settings
  44. 54 0
      OUP/Qwerty.xaml
  45. 90 0
      OUP/Qwerty.xaml.cs
  46. 35 0
      OUP/RelayCommand.cs
  47. 23 0
      OUP/Revenue.cs
  48. 50 0
      OUP/Services/FileService.cs
  49. 25 0
      OUP/Sign in.xaml
  50. 34 0
      OUP/Sign in.xaml.cs
  51. 23 0
      OUP/SuppliersProduct.cs
  52. 30 0
      OUP/SupplyProduct.cs
  53. 28 0
      OUP/SurrenderOfMoney.cs
  54. 64 0
      OUP/ViewModel.cs
  55. 23 0
      OUP/WorkingShift.cs
  56. BIN
      OUP/bin/Debug/EntityFramework.dll
  57. 17531 0
      OUP/bin/Debug/EntityFramework.xml
  58. BIN
      OUP/bin/Debug/OUP.exe
  59. 13 0
      OUP/bin/Debug/OUP.exe.config
  60. BIN
      OUP/bin/Debug/OUP.pdb
  61. 4 0
      OUP/obj/Debug/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs
  62. 4 0
      OUP/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
  63. 4 0
      OUP/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs
  64. 70 0
      OUP/obj/Debug/App.g.cs
  65. 70 0
      OUP/obj/Debug/App.g.i.cs
  66. BIN
      OUP/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  67. BIN
      OUP/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  68. 86 0
      OUP/obj/Debug/MainWindow.g.cs
  69. 86 0
      OUP/obj/Debug/MainWindow.g.i.cs
  70. BIN
      OUP/obj/Debug/OUP.Properties.Resources.resources
  71. BIN
      OUP/obj/Debug/OUP.csproj.AssemblyReference.cache
  72. 0 0
      OUP/obj/Debug/OUP.csproj.CopyComplete
  73. 1 0
      OUP/obj/Debug/OUP.csproj.CoreCompileInputs.cache
  74. 60 0
      OUP/obj/Debug/OUP.csproj.FileListAbsolute.txt
  75. BIN
      OUP/obj/Debug/OUP.csproj.GenerateResource.cache
  76. 0 0
      OUP/obj/Debug/OUP.csproj.SuggestedBindingRedirects.cache
  77. 379 0
      OUP/obj/Debug/OUP.exe.config
  78. 97 0
      OUP/obj/Debug/OUP.g.cs
  79. 97 0
      OUP/obj/Debug/OUP.g.i.cs
  80. BIN
      OUP/obj/Debug/OUP.g.resources
  81. 14 0
      OUP/obj/Debug/OUP_Content.g.cs
  82. 14 0
      OUP/obj/Debug/OUP_Content.g.i.cs
  83. 20 0
      OUP/obj/Debug/OUP_MarkupCompile.cache
  84. 20 0
      OUP/obj/Debug/OUP_MarkupCompile.i.cache
  85. 7 0
      OUP/obj/Debug/OUP_MarkupCompile.lref
  86. 184 0
      OUP/obj/Debug/Qwerty.g.cs
  87. 184 0
      OUP/obj/Debug/Qwerty.g.i.cs
  88. 86 0
      OUP/obj/Debug/Sign in.g.cs
  89. 86 0
      OUP/obj/Debug/Sign in.g.i.cs
  90. 0 0
      OUP/obj/Debug/TempPE/Model1.Context.cs.dll
  91. BIN
      OUP/obj/Debug/TempPE/Model1.Designer.cs.dll
  92. BIN
      OUP/obj/Debug/TempPE/Model1.cs.dll
  93. BIN
      OUP/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
  94. 388 0
      OUP/obj/Debug/edmxResourcesToEmbed/Model1.csdl
  95. 154 0
      OUP/obj/Debug/edmxResourcesToEmbed/Model1.msl
  96. 362 0
      OUP/obj/Debug/edmxResourcesToEmbed/Model1.ssdl
  97. 42 0
      OUP/packages.config
  98. BIN
      packages/EntityFramework.4.3.0/.signature.p7s
  99. 6 0
      packages/EntityFramework.4.3.0/Content/App.config.transform
  100. 0 0
      packages/EntityFramework.4.3.0/Content/Web.config.transform

+ 11 - 0
.vs/OUP/project-colors.json

@@ -0,0 +1,11 @@
+{
+  "Version": 1,
+  "ProjectMap": {
+    "99cf6337-2a5d-4296-afd9-10eeab74ebb2": {
+      "ProjectGuid": "99cf6337-2a5d-4296-afd9-10eeab74ebb2",
+      "DisplayName": "OUP",
+      "ColorIndex": 0
+    }
+  },
+  "NextColorIndex": 1
+}

BIN
.vs/OUP/v16/.suo


BIN
.vs/OUP/v17/.suo


+ 3 - 0
.vs/ProjectSettings.json

@@ -0,0 +1,3 @@
+{
+  "CurrentProjectSetting": null
+}

+ 8 - 0
.vs/VSWorkspaceState.json

@@ -0,0 +1,8 @@
+{
+  "ExpandedNodes": [
+    "",
+    "\\OUP"
+  ],
+  "SelectedNode": "\\OUP\\MainWindow.xaml",
+  "PreviewInSolutionExplorer": false
+}

BIN
.vs/slnx.sqlite


+ 25 - 0
OUP.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32126.317
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OUP", "OUP\OUP.csproj", "{99CF6337-2A5D-4296-AFD9-10EEAB74EBB2}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{99CF6337-2A5D-4296-AFD9-10EEAB74EBB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{99CF6337-2A5D-4296-AFD9-10EEAB74EBB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{99CF6337-2A5D-4296-AFD9-10EEAB74EBB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{99CF6337-2A5D-4296-AFD9-10EEAB74EBB2}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {9FEDC7B6-A267-4314-B5AB-0F1A24C5F934}
+	EndGlobalSection
+EndGlobal

+ 26 - 0
OUP/Address.cs

@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Address
+    {
+        public int IdAddress { get; set; }
+        public string Street { get; set; }
+        public int Number { get; set; }
+        public int HouseNumber { get; set; }
+        public int Flat { get; set; }
+        public Nullable<int> IdEmployee { get; set; }
+    
+        public virtual Employees Employees { get; set; }
+    }
+}

+ 61 - 0
OUP/App.config

@@ -0,0 +1,61 @@
+<?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=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
+  </configSections>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
+  </startup>
+  <connectionStrings>
+    <add name="Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=mssql;initial catalog=gr606_sosan;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient"/>
+  </connectionStrings>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Caching.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0"/>
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0"/>
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 9 - 0
OUP/App.xaml

@@ -0,0 +1,9 @@
+<Application x:Class="OUP.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:OUP"
+             StartupUri="OUP.xaml">
+    <Application.Resources>
+         
+    </Application.Resources>
+</Application>

+ 21 - 0
OUP/App.xaml.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Globalization;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Markup;
+
+namespace OUP
+{
+    /// <summary>
+    /// Логика взаимодействия для App.xaml
+    /// </summary>
+    public partial class App : Application
+    {
+        
+    }
+}

+ 20 - 0
OUP/BaseViewModel.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OUP
+{
+    public class BaseViewModel : INotifyPropertyChanged
+    {
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        public void OnPropertyChanged([CallerMemberName] string property = "")
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
+        }
+    }
+}

+ 24 - 0
OUP/CardAmount.cs

@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class CardAmount
+    {
+        public int IdCard { get; set; }
+        public Nullable<decimal> Sum { get; set; }
+        public string PaymentName { get; set; }
+        public Nullable<int> IdPay { get; set; }
+    
+        public virtual Payment Payment { get; set; }
+    }
+}

+ 24 - 0
OUP/Cash.cs

@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Cash
+    {
+        public int IdCash { get; set; }
+        public Nullable<decimal> Sum { get; set; }
+        public string PaymentName { get; set; }
+        public Nullable<int> IdPay { get; set; }
+    
+        public virtual Payment Payment { get; set; }
+    }
+}

+ 30 - 0
OUP/CashRegister.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class CashRegister
+    {
+        public int IdCashRegistre { get; set; }
+        public Nullable<int> IdEmployee { get; set; }
+        public Nullable<int> IdProduct { get; set; }
+        public Nullable<int> IdSurrender { get; set; }
+        public Nullable<int> IdDate { get; set; }
+        public Nullable<int> IdPay { get; set; }
+    
+        public virtual Dates Dates { get; set; }
+        public virtual Employees Employees { get; set; }
+        public virtual Payment Payment { get; set; }
+        public virtual Product Product { get; set; }
+        public virtual SurrenderOfMoney SurrenderOfMoney { get; set; }
+    }
+}

+ 112 - 0
OUP/ClassMain.cs

@@ -0,0 +1,112 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OUP
+{
+    class ClassMain : BaseViewModel
+    {
+        private ObservableCollection<Product> _products;
+        private ObservableCollection<CashRegister> _cashRegisters;
+        private RelayCommand _updateOpenWindow;
+
+        private Product _selectedProduct;
+        private CashRegister _cashRegister;
+        private RelayCommand _update;
+        public RelayCommand UpdateOpenWindow
+        {
+            get
+            {
+                return _updateOpenWindow ??
+                    (_updateOpenWindow = new RelayCommand((x) =>
+                    {
+                        if (x is CashRegister xx)
+                        {
+
+                        }
+                    }));
+            }
+        }
+
+        public ObservableCollection<Product> Products
+        {
+            get
+            {
+                return _products;
+            }
+            set
+            {
+                _products = value;
+                OnPropertyChanged();
+            }
+        }
+        public Product SelectedProduct
+        {
+            get
+            {
+                return _selectedProduct;
+            }
+            set
+            {
+                _selectedProduct = value;
+                OnPropertyChanged();
+            }
+        }
+        public CashRegister SelectedCashRegister
+        {
+            get
+            {
+                return _cashRegister;
+            }
+            set
+            {
+                _cashRegister = value;
+                OnPropertyChanged();
+            }
+        }
+
+        public ObservableCollection<CashRegister> CashRegister
+        {
+            get
+            {
+                return _cashRegisters;
+            }
+            set
+            {
+                _cashRegisters = value;
+                OnPropertyChanged();
+            }
+        }
+
+        private void LoadCollection()
+        {
+            Products.Clear();
+            Products = new ObservableCollection<Product>(Helper.GetContext().Product);
+        }
+
+        public ClassMain()
+        {
+            _products = new ObservableCollection<Product>(Helper.GetContext().Product);
+            _cashRegisters = new ObservableCollection<CashRegister>(Helper.GetContext().CashRegister);
+        }
+        public RelayCommand Update
+        {
+            get
+            {
+                return _update ??
+                        (_update = new RelayCommand((x) =>
+                        {
+                            SelectedProduct.CashRegister = CashRegister;
+                            Helper.GetContext().SaveChanges();
+                            LoadCollection();
+
+
+                        }));
+            }
+        }
+
+    }
+}

+ 22 - 0
OUP/Context.cs

@@ -0,0 +1,22 @@
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+
+namespace OUP
+{
+    public class Context : DbContext
+    {
+        public DbSet<Product> products  { get; set; }
+
+        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+        {
+
+            optionsBuilder.UseSqlServer(ConfigurationManager.ConnectionStrings["gr606_sosan"].ConnectionString);
+        }
+    }
+}

+ 27 - 0
OUP/Dates.cs

@@ -0,0 +1,27 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Dates
+    {
+        public Dates()
+        {
+            this.CashRegister = new HashSet<CashRegister>();
+        }
+    
+        public int IdDate { get; set; }
+        public Nullable<System.DateTime> Date { get; set; }
+    
+        public virtual ICollection<CashRegister> CashRegister { get; set; }
+    }
+}

+ 41 - 0
OUP/Employees.cs

@@ -0,0 +1,41 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Employees
+    {
+        public Employees()
+        {
+            this.Address = new HashSet<Address>();
+            this.CashRegister = new HashSet<CashRegister>();
+            this.PasportDetails = new HashSet<PasportDetails>();
+            this.Revenue = new HashSet<Revenue>();
+            this.WorkingShift = new HashSet<WorkingShift>();
+        }
+    
+        public int IdEmployee { get; set; }
+        public string Surname { get; set; }
+        public string Name { get; set; }
+        public string Patronymic { get; set; }
+        public string TelephoneNumber { get; set; }
+        public string Email { get; set; }
+        public string Login { get; set; }
+        public string Password { get; set; }
+    
+        public virtual ICollection<Address> Address { get; set; }
+        public virtual ICollection<CashRegister> CashRegister { get; set; }
+        public virtual ICollection<PasportDetails> PasportDetails { get; set; }
+        public virtual ICollection<Revenue> Revenue { get; set; }
+        public virtual ICollection<WorkingShift> WorkingShift { get; set; }
+    }
+}

+ 62 - 0
OUP/ForOUP/Descriptions.cs

@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OUP.ForOUP
+{
+    class Descriptions: INotifyPropertyChanged
+    {
+        private bool _isDone;
+        private string _prod;
+        private string _description;
+        public string Product
+        {
+            get { return _prod; }
+            set {
+                if (_prod == value)
+                    return;
+                _prod = value;
+                OnPropertyChanged("Product");
+               
+            }
+        }
+        public DateTime Date { get; set; } = DateTime.Now;
+      
+           
+        public bool IsDone
+        {
+            get { return _isDone; }
+            set 
+            {
+                if (_isDone == value)
+                    return;
+                _isDone = value;
+                OnPropertyChanged("IsDone");
+            }
+        }
+
+        public string Description
+        {
+            get { return _description; }
+            set {
+                if (_description == value)
+                    return;
+                _description = value;
+                OnPropertyChanged("Description");
+
+                _description = value; 
+            }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        protected virtual void OnPropertyChanged(string propertyName = "")
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+           
+        }
+    }
+}

+ 20 - 0
OUP/Helper.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OUP
+{
+    public class Helper
+    {
+        private static Entities _context;
+        public static Entities GetContext()
+        {
+            if (_context == null)
+                _context = new Entities();
+            return _context;
+        }
+
+    }
+}

+ 64 - 0
OUP/MainViewModel.cs

@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace OUP
+{
+    public class MainViewModel : BaseViewModel
+    {
+        private RelayCommand _authcommand;
+
+
+
+
+        private string _login;
+        private string _password;
+
+        public string Login
+        {
+            get => _login;
+            set
+
+            {
+                _login = value;
+                OnPropertyChanged();
+            }
+        }
+        public string Password
+        {
+            get => _password;
+            set
+            {
+                _password = value;
+                OnPropertyChanged();
+            }
+        }
+        public RelayCommand AuthCommand
+        {
+            get
+            {
+                return _authcommand ??
+                        (_authcommand = new RelayCommand((x) =>
+                        {
+                            var authUser = Helper.GetContext().Employees.SingleOrDefault(user => user.Login == Login && user.Password == Password);
+                            if (authUser == null)
+                            {
+                                MessageBox.Show("Введите верный логин и пароль");
+                                return;
+                            }
+                            else
+                            {
+                                OUP Window1 = new OUP();
+                                Window1.Show();
+                            }
+
+
+
+                        }));
+            }
+        }
+    }
+}

+ 43 - 0
OUP/MainWindow.xaml

@@ -0,0 +1,43 @@
+<Window x:Class="OUP.MainWindow"
+        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:OUP"
+        mc:Ignorable="d"
+        Title="MainWindow" Height="450" Width="800">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="50"></RowDefinition>
+            <RowDefinition></RowDefinition>
+
+        </Grid.RowDefinitions>
+        <DataGrid IsReadOnly="True" ItemsSource="{Binding CashRegister}" Grid.Row="1" SelectedItem="{Binding SelectedCashRegister}"  AutoGenerateColumns="False" >
+            <DataGrid.Columns>
+                <DataGridTextColumn Header="Продукт" Binding="{Binding Product.Name}"></DataGridTextColumn>
+                <DataGridTextColumn Header="Цена" Binding="{Binding SupplyProduct.CostDeliveredProduct}"></DataGridTextColumn>
+                <DataGridTextColumn Header="Дата"  Binding="{Binding Dates.Date}"></DataGridTextColumn>
+            </DataGrid.Columns>
+            <DataGrid.RowDetailsTemplate >
+                <DataTemplate>
+                    <DataGrid IsReadOnly="True" ItemsSource="{Binding CashRegister }" AutoGenerateColumns="False">
+                        <DataGrid.Columns>
+                            <DataGridTextColumn Header="Наименование" Binding="{Binding Product.Name}"></DataGridTextColumn>
+                            <DataGridTextColumn Header="Стоимость" Binding="{Binding SupplyProduct.CostDeliveredProduct}"></DataGridTextColumn>
+                            <DataGridTextColumn Header="Дата" Binding="{Binding Dates.Date}"></DataGridTextColumn>
+                        </DataGrid.Columns>
+                    </DataGrid>
+                </DataTemplate>
+            </DataGrid.RowDetailsTemplate>
+        </DataGrid>
+        <StackPanel Orientation="Horizontal">
+            <!--<ComboBox Height="30" Width="150" Margin="100,10" ItemsSource = "{Binding Product.Name}" DisplayMemberPath="NameStatusOrder" SelectedItem="{Binding SelectedStatus}"></ComboBox>-->
+            <!--<Button Width="150" Height="30" Content="Добавить"  Command="{Binding Update}" Margin="20,10" Click="Button_Click" />-->
+            <Button Height="30" Width="178"  Content="Обновить" Command="{Binding UpdateOpenWindow}" CommandParameter="{Binding CashRegister}"/>
+            <Button Width="150" Height="30" Content="Добавить" Margin="20,10" Click="Button_Click"/>
+        </StackPanel>
+
+
+    
+    </Grid>
+</Window>

+ 34 - 0
OUP/MainWindow.xaml.cs

@@ -0,0 +1,34 @@
+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.Navigation;
+using System.Windows.Shapes;
+
+namespace OUP
+{
+    /// <summary>
+    /// Логика взаимодействия для MainWindow.xaml
+    /// </summary>
+    public partial class MainWindow : Window
+    {
+        public MainWindow()
+        {
+            InitializeComponent();
+            DataContext = new ClassMain();
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+         
+        }
+    }
+}

+ 43 - 0
OUP/Model1.Context.cs

@@ -0,0 +1,43 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Data.Entity;
+    using System.Data.Entity.Infrastructure;
+    
+    public partial class Entities : DbContext
+    {
+        public Entities()
+            : base("name=Entities")
+        {
+        }
+    
+        protected override void OnModelCreating(DbModelBuilder modelBuilder)
+        {
+            throw new UnintentionalCodeFirstException();
+        }
+    
+        public DbSet<Address> Address { get; set; }
+        public DbSet<CardAmount> CardAmount { get; set; }
+        public DbSet<Cash> Cash { get; set; }
+        public DbSet<CashRegister> CashRegister { get; set; }
+        public DbSet<Dates> Dates { get; set; }
+        public DbSet<Employees> Employees { get; set; }
+        public DbSet<PasportDetails> PasportDetails { get; set; }
+        public DbSet<Payment> Payment { get; set; }
+        public DbSet<Product> Product { get; set; }
+        public DbSet<Revenue> Revenue { get; set; }
+        public DbSet<SuppliersProduct> SuppliersProduct { get; set; }
+        public DbSet<SupplyProduct> SupplyProduct { get; set; }
+        public DbSet<SurrenderOfMoney> SurrenderOfMoney { get; set; }
+        public DbSet<WorkingShift> WorkingShift { get; set; }
+    }
+}

+ 735 - 0
OUP/Model1.Context.tt

@@ -0,0 +1,735 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF.Utility.CS.ttinclude"#><#@
+ output extension=".cs"#><#
+
+const string inputFile = @"Model1.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
+var itemCollection = loader.CreateEdmItemCollection(inputFile);
+var modelNamespace = loader.GetModelNamespace(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
+if (container == null)
+{
+    return string.Empty;
+}
+#>
+//------------------------------------------------------------------------------
+// <auto-generated>
+// <#=GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=GetResourceString("Template_GeneratedCodeCommentLine3")#>
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+<#
+
+var codeNamespace = code.VsNamespaceSuggestion();
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#
+    PushIndent("    ");
+}
+
+#>
+using System;
+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+<#
+if (container.FunctionImports.Any())
+{
+#>
+using System.Data.Objects;
+using System.Data.Objects.DataClasses;
+using System.Linq;
+<#
+}
+#>
+
+<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
+{
+    public <#=code.Escape(container)#>()
+        : base("name=<#=container.Name#>")
+    {
+<#
+if (!loader.IsLazyLoadingEnabled(container))
+{
+#>
+        this.Configuration.LazyLoadingEnabled = false;
+<#
+}
+#>
+    }
+
+    protected override void OnModelCreating(DbModelBuilder modelBuilder)
+    {
+        throw new UnintentionalCodeFirstException();
+    }
+
+<#
+    foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
+    {
+#>
+    <#=codeStringGenerator.DbSet(entitySet)#>
+<#
+    }
+
+    foreach (var edmFunction in container.FunctionImports)
+    {
+        WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
+    }
+#>
+}
+<#
+
+if (!String.IsNullOrEmpty(codeNamespace))
+{
+    PopIndent();
+#>
+}
+<#
+}
+#>
+<#+
+
+private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+{
+    if (typeMapper.IsComposable(edmFunction))
+    {
+#>
+
+    [EdmFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
+    <#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
+    {
+<#+
+        codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+        <#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
+    }
+<#+
+    }
+    else
+    {
+#>
+
+    <#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
+    {
+<#+
+        codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
+#>
+        <#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
+    }
+<#+
+        if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
+        {
+            WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
+        }
+    }
+}
+
+public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
+{
+#>
+        var <#=name#> = <#=isNotNull#> ?
+            <#=notNullInit#> :
+            <#=nullInit#>;
+
+<#+
+}
+
+public const string TemplateId = "CSharp_DbContext_Context_EF5";
+
+public class CodeStringGenerator
+{
+    private readonly CodeGenerationTools _code;
+    private readonly TypeMapper _typeMapper;
+    private readonly MetadataTools _ef;
+
+    public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(typeMapper, "typeMapper");
+        ArgumentNotNull(ef, "ef");
+
+        _code = code;
+        _typeMapper = typeMapper;
+        _ef = ef;
+    }
+
+    public string Property(EdmProperty edmProperty)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            Accessibility.ForProperty(edmProperty),
+            _typeMapper.GetTypeName(edmProperty.TypeUsage),
+            _code.Escape(edmProperty),
+            _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+            _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+    }
+
+    public string NavigationProperty(NavigationProperty navigationProperty)
+    {
+        var endType = _typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType());
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            AccessibilityAndVirtual(Accessibility.ForProperty(navigationProperty)),
+            navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+            _code.Escape(navigationProperty),
+            _code.SpaceAfter(Accessibility.ForGetter(navigationProperty)),
+            _code.SpaceAfter(Accessibility.ForSetter(navigationProperty)));
+    }
+    
+    public string AccessibilityAndVirtual(string accessibility)
+    {
+        return accessibility + (accessibility != "private" ? " virtual" : "");
+    }
+    
+    public string EntityClassOpening(EntityType entity)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1}partial class {2}{3}",
+            Accessibility.ForType(entity),
+            _code.SpaceAfter(_code.AbstractOption(entity)),
+            _code.Escape(entity),
+            _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+    }
+    
+    public string EnumOpening(SimpleType enumType)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} enum {1} : {2}",
+            Accessibility.ForType(enumType),
+            _code.Escape(enumType),
+            _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+        }
+    
+    public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
+    {
+        var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+        foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+        {
+            var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+            var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+            var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + parameter.RawClrTypeName + "))";
+            writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+        }
+    }
+    
+    public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} IQueryable<{1}> {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            _code.Escape(edmFunction),
+            string.Join(", ", parameters.Select(p => p.FunctionParameterType + " " + p.FunctionParameterName).ToArray()));
+    }
+    
+    public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            edmFunction.NamespaceName,
+            edmFunction.Name,
+            string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+            _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+    }
+    
+    public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var paramList = String.Join(", ", parameters.Select(p => p.FunctionParameterType + " " + p.FunctionParameterName).ToArray());
+        if (includeMergeOption)
+        {
+            paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+        }
+
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            _code.Escape(edmFunction),
+            paramList);
+    }
+    
+    public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+        if (includeMergeOption)
+        {
+            callParams = ", mergeOption" + callParams;
+        }
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+            returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            edmFunction.Name,
+            callParams);
+    }
+    
+    public string DbSet(EntitySet entitySet)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} DbSet<{1}> {2} {{ get; set; }}",
+            Accessibility.ForReadOnlyProperty(entitySet),
+            _typeMapper.GetTypeName(entitySet.ElementType),
+            _code.Escape(entitySet));
+    }
+
+    public string UsingDirectives(bool inHeader, bool includeCollections = true)
+    {
+        return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+            ? string.Format(
+                CultureInfo.InvariantCulture,
+                "{0}using System;{1}" +
+                "{2}",
+                inHeader ? Environment.NewLine : "",
+                includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+                inHeader ? "" : Environment.NewLine)
+            : "";
+    }
+}
+
+public class TypeMapper
+{
+    private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+    private readonly System.Collections.IList _errors;
+    private readonly CodeGenerationTools _code;
+    private readonly MetadataTools _ef;
+
+    public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(ef, "ef");
+        ArgumentNotNull(errors, "errors");
+
+        _code = code;
+        _ef = ef;
+        _errors = errors;
+    }
+
+    public string GetTypeName(TypeUsage typeUsage)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+    }
+
+    public string GetTypeName(EdmType edmType)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+    }
+
+    public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, string modelNamespace)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+    {
+        if (edmType == null)
+        {
+            return null;
+        }
+
+        var collectionType = edmType as CollectionType;
+        if (collectionType != null)
+        {
+            return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+        }
+
+        var typeName = _code.Escape(edmType.MetadataProperties
+                                .Where(p => p.Name == ExternalTypeNameAttributeName)
+                                .Select(p => (string)p.Value)
+                                .FirstOrDefault())
+            ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+                _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+                _code.Escape(edmType));
+
+        if (edmType is StructuralType)
+        {
+            return typeName;
+        }
+
+        if (edmType is SimpleType)
+        {
+            var clrType = UnderlyingClrType(edmType);
+            if (!IsEnumType(edmType))
+            {
+                typeName = _code.Escape(clrType);
+            }
+
+            return clrType.IsValueType && isNullable == true ?
+                String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+                typeName;
+        }
+
+        throw new ArgumentException("edmType");
+    }
+    
+    public Type UnderlyingClrType(EdmType edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        var primitiveType = edmType as PrimitiveType;
+        if (primitiveType != null)
+        {
+            return primitiveType.ClrEquivalentType;
+        }
+
+        if (IsEnumType(edmType))
+        {
+            return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+        }
+
+        return typeof(object);
+    }
+    
+    public object GetEnumMemberValue(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var valueProperty = enumMember.GetType().GetProperty("Value");
+        return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+    }
+    
+    public string GetEnumMemberName(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var nameProperty = enumMember.GetType().GetProperty("Name");
+        return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+    }
+
+    public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        var membersProperty = enumType.GetType().GetProperty("Members");
+        return membersProperty != null 
+            ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+            : Enumerable.Empty<MetadataItem>();
+    }
+    
+    public bool EnumIsFlags(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+        
+        var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+        return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+    }
+
+    public bool IsEnumType(GlobalItem edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        return edmType.GetType().Name == "EnumType";
+    }
+
+    public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+    }
+
+    public string CreateLiteral(object value)
+    {
+        if (value == null || value.GetType() != typeof(TimeSpan))
+        {
+            return _code.CreateLiteral(value);
+        }
+
+        return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+    }
+    
+    public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
+    {
+        ArgumentNotNull(types, "types");
+        ArgumentNotNull(sourceFile, "sourceFile");
+        
+        var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
+        if (types.Any(item => !hash.Add(item)))
+        {
+            _errors.Add(
+                new CompilerError(sourceFile, -1, -1, "6023",
+                    String.Format(CultureInfo.CurrentCulture, GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+            return false;
+        }
+        return true;
+    }
+    
+    public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
+    {
+        return GetItemsToGenerate<SimpleType>(itemCollection)
+            .Where(e => IsEnumType(e));
+    }
+    
+    public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
+    {
+        return itemCollection
+            .OfType<T>()
+            .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+            .OrderBy(i => i.Name);
+    }
+
+    public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
+    {
+        return itemCollection
+            .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+            .Select(g => GetGlobalItemName(g));
+    }
+
+    public string GetGlobalItemName(GlobalItem item)
+    {
+        if (item is EdmType)
+        {
+            return ((EdmType)item).Name;
+        }
+        else
+        {
+            return ((EntityContainer)item).Name;
+        }
+    }
+
+    public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+    
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+
+    public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type);
+    }
+    
+    public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+    }
+    
+    public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+        return returnParamsProperty == null
+            ? edmFunction.ReturnParameter
+            : ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+    }
+
+    public bool IsComposable(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+        return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+    }
+
+    public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
+    {
+        return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+    }
+
+    public TypeUsage GetReturnType(EdmFunction edmFunction)
+    {
+        var returnParam = GetReturnParameter(edmFunction);
+        return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+    }
+    
+    public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+    {
+        var returnType = GetReturnType(edmFunction);
+        return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+    }
+}
+
+public class EdmMetadataLoader
+{
+    private readonly IDynamicHost _host;
+    private readonly System.Collections.IList _errors;
+
+    public EdmMetadataLoader(IDynamicHost host, System.Collections.IList errors)
+    {
+        ArgumentNotNull(host, "host");
+        ArgumentNotNull(errors, "errors");
+
+        _host = host;
+        _errors = errors;
+    }
+
+    public IEnumerable<GlobalItem> CreateEdmItemCollection(string sourcePath)
+    {
+        ArgumentNotNull(sourcePath, "sourcePath");
+
+        if (!ValidateInputPath(sourcePath))
+        {
+            return new EdmItemCollection();
+        }
+
+        var schemaElement = LoadRootElement(_host.ResolvePath(sourcePath));
+        if (schemaElement != null)
+        {
+            using (var reader = schemaElement.CreateReader())
+            {
+                IList<EdmSchemaError> errors;
+                var itemCollection = MetadataItemCollectionFactory.CreateEdmItemCollection(new[] { reader }, out errors);
+
+                ProcessErrors(errors, sourcePath);
+
+                return itemCollection;
+            }
+        }
+        return new EdmItemCollection();
+    }
+
+    public string GetModelNamespace(string sourcePath)
+    {
+        ArgumentNotNull(sourcePath, "sourcePath");
+
+        if (!ValidateInputPath(sourcePath))
+        {
+            return string.Empty;
+        }
+
+        var model = LoadRootElement(_host.ResolvePath(sourcePath));
+        if (model == null)
+        {
+            return string.Empty;
+        }
+
+        var attribute = model.Attribute("Namespace");
+        return attribute != null ? attribute.Value : "";
+    }
+
+    private bool ValidateInputPath(string sourcePath)
+    {
+        if (sourcePath == "$" + "edmxInputFile" + "$")
+        {
+            _errors.Add(
+                new CompilerError(_host.TemplateFile ?? sourcePath, 0, 0, string.Empty,
+                    GetResourceString("Template_ReplaceVsItemTemplateToken")));
+            return false;
+        }
+
+        return true;
+    }
+
+    public XElement LoadRootElement(string sourcePath)
+    {
+        ArgumentNotNull(sourcePath, "sourcePath");
+
+        var root = XElement.Load(sourcePath, LoadOptions.SetBaseUri | LoadOptions.SetLineInfo);
+        return root.Elements()
+            .Where(e => e.Name.LocalName == "Runtime")
+            .Elements()
+            .Where(e => e.Name.LocalName == "ConceptualModels")
+            .Elements()
+            .Where(e => e.Name.LocalName == "Schema")
+            .FirstOrDefault()
+                ?? root;
+    }
+
+    private void ProcessErrors(IEnumerable<EdmSchemaError> errors, string sourceFilePath)
+    {
+        foreach (var error in errors)
+        {
+            _errors.Add(
+                new CompilerError(
+                    error.SchemaLocation ?? sourceFilePath,
+                    error.Line,
+                    error.Column,
+                    error.ErrorCode.ToString(CultureInfo.InvariantCulture),
+                    error.Message)
+                {
+                    IsWarning = error.Severity == EdmSchemaErrorSeverity.Warning
+                });
+        }
+    }
+    
+    public bool IsLazyLoadingEnabled(EntityContainer container)
+    {
+        string lazyLoadingAttributeValue;
+        var lazyLoadingAttributeName = MetadataConstants.EDM_ANNOTATION_09_02 + ":LazyLoadingEnabled";
+        bool isLazyLoading;
+        return !MetadataTools.TryGetStringMetadataPropertySetting(container, lazyLoadingAttributeName, out lazyLoadingAttributeValue)
+            || !bool.TryParse(lazyLoadingAttributeValue, out isLazyLoading)
+            || isLazyLoading;
+    }
+}
+
+public static void ArgumentNotNull<T>(T arg, string name) where T : class
+{
+    if (arg == null)
+    {
+        throw new ArgumentNullException(name);
+    }
+}
+    
+private static readonly Lazy<System.Resources.ResourceManager> ResourceManager =
+    new Lazy<System.Resources.ResourceManager>(
+        () => new System.Resources.ResourceManager("System.Data.Entity.Design", typeof(MetadataItemCollectionFactory).Assembly), isThreadSafe: true);
+
+public static string GetResourceString(string resourceName)
+{
+    ArgumentNotNull(resourceName, "resourceName");
+
+    return ResourceManager.Value.GetString(resourceName, null);
+}
+
+#>

+ 10 - 0
OUP/Model1.Designer.cs

@@ -0,0 +1,10 @@
+// Создание кода T4 для модели "M:\OUP\OUP\OUP\Model1.edmx" включено. 
+// Чтобы включить формирование кода прежних версий, измените значение свойства "Стратегия создания кода" конструктора
+// на "Legacy ObjectContext". Это свойство доступно в окне "Свойства", если модель
+// открыта в конструкторе.
+
+// Если не сформированы контекст и классы сущности, возможная причина в том, что вы создали пустую модель, но
+// еще не выбрали версию Entity Framework для использования. Чтобы сформировать класс контекста и классы сущностей
+// для своей модели, откройте модель в конструкторе, щелкните правой кнопкой область конструктора и
+// выберите "Обновить модель из базы данных", "Сформировать базу данных из модели" или "Добавить элемент формирования
+// кода...".

+ 9 - 0
OUP/Model1.cs

@@ -0,0 +1,9 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+

+ 935 - 0
OUP/Model1.edmx

@@ -0,0 +1,935 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
+  <!-- EF Runtime content -->
+  <edmx:Runtime>
+    <!-- SSDL content -->
+    <edmx:StorageModels>
+      <Schema Namespace="Хранилище gr606_sosanModel" Provider="System.Data.SqlClient" ProviderManifestToken="2008" 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/02/edm/ssdl">
+        <EntityType Name="Address">
+          <Key>
+            <PropertyRef Name="IdAddress" />
+          </Key>
+          <Property Name="IdAddress" Type="int" Nullable="false" />
+          <Property Name="Street" Type="nvarchar" MaxLength="100" Nullable="false" />
+          <Property Name="Number" Type="int" Nullable="false" />
+          <Property Name="HouseNumber" Type="int" Nullable="false" />
+          <Property Name="Flat" Type="int" Nullable="false" />
+          <Property Name="IdEmployee" Type="int" />
+        </EntityType>
+        <EntityType Name="CardAmount">
+          <Key>
+            <PropertyRef Name="IdCard" />
+          </Key>
+          <Property Name="IdCard" Type="int" Nullable="false" />
+          <Property Name="Sum" Type="money" />
+          <Property Name="PaymentName" Type="nvarchar" MaxLength="50" />
+          <Property Name="IdPay" Type="int" />
+        </EntityType>
+        <EntityType Name="Cash">
+          <Key>
+            <PropertyRef Name="IdCash" />
+          </Key>
+          <Property Name="IdCash" Type="int" Nullable="false" />
+          <Property Name="Sum" Type="money" />
+          <Property Name="PaymentName" Type="nvarchar" MaxLength="50" />
+          <Property Name="IdPay" Type="int" />
+        </EntityType>
+        <EntityType Name="CashRegister">
+          <Key>
+            <PropertyRef Name="IdCashRegistre" />
+          </Key>
+          <Property Name="IdCashRegistre" Type="int" Nullable="false" />
+          <Property Name="IdEmployee" Type="int" />
+          <Property Name="IdProduct" Type="int" />
+          <Property Name="IdSurrender" Type="int" />
+          <Property Name="IdDate" Type="int" />
+          <Property Name="IdPay" Type="int" />
+        </EntityType>
+        <EntityType Name="Dates">
+          <Key>
+            <PropertyRef Name="IdDate" />
+          </Key>
+          <Property Name="IdDate" Type="int" Nullable="false" />
+          <Property Name="Date" Type="date" />
+        </EntityType>
+        <EntityType Name="Employees">
+          <Key>
+            <PropertyRef Name="IdEmployee" />
+          </Key>
+          <Property Name="IdEmployee" Type="int" Nullable="false" />
+          <Property Name="Surname" Type="nvarchar" MaxLength="100" Nullable="false" />
+          <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
+          <Property Name="Patronymic" Type="nvarchar" MaxLength="100" Nullable="false" />
+          <Property Name="TelephoneNumber" Type="nvarchar" MaxLength="20" Nullable="false" />
+          <Property Name="Email" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="Login" Type="nvarchar" MaxLength="20" Nullable="false" />
+          <Property Name="Password" Type="nvarchar" MaxLength="20" Nullable="false" />
+        </EntityType>
+        <EntityType Name="PasportDetails">
+          <Key>
+            <PropertyRef Name="IdDetail" />
+          </Key>
+          <Property Name="IdDetail" Type="int" Nullable="false" />
+          <Property Name="Number" Type="int" Nullable="false" />
+          <Property Name="Series" Type="int" Nullable="false" />
+          <Property Name="IssuedBy" Type="nvarchar" MaxLength="150" Nullable="false" />
+          <Property Name="IdEmployee" Type="int" />
+        </EntityType>
+        <EntityType Name="Payment">
+          <Key>
+            <PropertyRef Name="IdPay" />
+          </Key>
+          <Property Name="IdPay" Type="int" Nullable="false" />
+          <Property Name="HistoryAboutPayment" Type="nvarchar" MaxLength="255" />
+        </EntityType>
+        <EntityType Name="Product">
+          <Key>
+            <PropertyRef Name="IdProduct" />
+          </Key>
+          <Property Name="IdProduct" Type="int" Nullable="false" />
+          <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
+          <Property Name="Manufacture" Type="nvarchar" MaxLength="255" Nullable="false" />
+          <Property Name="ProductGroup" Type="nvarchar" MaxLength="255" Nullable="false" />
+          <Property Name="Cost" Type="money" Nullable="false" />
+          <Property Name="TypeOfProduct" Type="nvarchar" MaxLength="100" Nullable="false" />
+          <Property Name="Bardcode" Type="int" Nullable="false" />
+          <Property Name="Margin" Type="money" Nullable="false" />
+          <Property Name="Quantity" Type="int" Nullable="false" />
+          <Property Name="Discount" Type="money" Nullable="false" />
+          <Property Name="Unit" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="VAT" Type="money" />
+        </EntityType>
+        <EntityType Name="Revenue">
+          <Key>
+            <PropertyRef Name="IdRevenue" />
+          </Key>
+          <Property Name="IdRevenue" Type="int" Nullable="false" />
+          <Property Name="SumRevenue" Type="money" />
+          <Property Name="IdEmployee" Type="int" />
+        </EntityType>
+        <EntityType Name="SuppliersProduct">
+          <Key>
+            <PropertyRef Name="IdSupplier" />
+          </Key>
+          <Property Name="IdSupplier" Type="int" Nullable="false" />
+          <Property Name="CompanyName" Type="nvarchar" MaxLength="255" Nullable="false" />
+          <Property Name="IdSupply" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="SupplyProduct">
+          <Key>
+            <PropertyRef Name="IdSupply" />
+          </Key>
+          <Property Name="IdSupply" Type="int" Nullable="false" />
+          <Property Name="QuantityDeliveredProduct" Type="int" Nullable="false" />
+          <Property Name="CostDeliveredProduct" Type="money" Nullable="false" />
+          <Property Name="IdProduct" Type="int" Nullable="false" />
+        </EntityType>
+        <EntityType Name="SurrenderOfMoney">
+          <Key>
+            <PropertyRef Name="IdSurrender" />
+          </Key>
+          <Property Name="IdSurrender" Type="int" Nullable="false" />
+          <Property Name="Sum" Type="money" />
+          <Property Name="NumberOfChecks" Type="int" />
+        </EntityType>
+        <EntityType Name="WorkingShift">
+          <Key>
+            <PropertyRef Name="IdShift" />
+          </Key>
+          <Property Name="IdShift" Type="int" Nullable="false" />
+          <Property Name="NameShift" Type="nvarchar" MaxLength="100" Nullable="false" />
+          <Property Name="IdEmployee" Type="int" />
+        </EntityType>
+        <Association Name="FK_Address_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="Address" Type="Self.Address" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="Address">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CardAmount_Payment">
+          <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+          <End Role="CardAmount" Type="Self.CardAmount" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Payment">
+              <PropertyRef Name="IdPay" />
+            </Principal>
+            <Dependent Role="CardAmount">
+              <PropertyRef Name="IdPay" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Cash_Payment">
+          <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+          <End Role="Cash" Type="Self.Cash" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Payment">
+              <PropertyRef Name="IdPay" />
+            </Principal>
+            <Dependent Role="Cash">
+              <PropertyRef Name="IdPay" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Dates">
+          <End Role="Dates" Type="Self.Dates" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Dates">
+              <PropertyRef Name="IdDate" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdDate" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Payment">
+          <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Payment">
+              <PropertyRef Name="IdPay" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdPay" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Product">
+          <End Role="Product" Type="Self.Product" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Product">
+              <PropertyRef Name="IdProduct" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdProduct" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_SurrenderOfMoney">
+          <End Role="SurrenderOfMoney" Type="Self.SurrenderOfMoney" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="SurrenderOfMoney">
+              <PropertyRef Name="IdSurrender" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdSurrender" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PasportDetails_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="PasportDetails" Type="Self.PasportDetails" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="PasportDetails">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Revenue_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="Revenue" Type="Self.Revenue" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="Revenue">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_SuppliersProduct_SupplyProduct">
+          <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="1" />
+          <End Role="SuppliersProduct" Type="Self.SuppliersProduct" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="SupplyProduct">
+              <PropertyRef Name="IdSupply" />
+            </Principal>
+            <Dependent Role="SuppliersProduct">
+              <PropertyRef Name="IdSupply" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_SupplyProduct_Product">
+          <End Role="Product" Type="Self.Product" Multiplicity="1" />
+          <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Product">
+              <PropertyRef Name="IdProduct" />
+            </Principal>
+            <Dependent Role="SupplyProduct">
+              <PropertyRef Name="IdProduct" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_WorkingShift_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="WorkingShift" Type="Self.WorkingShift" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="WorkingShift">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <EntityContainer Name="Хранилище gr606_sosanModelContainer">
+          <EntitySet Name="Address" EntityType="Self.Address" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="CardAmount" EntityType="Self.CardAmount" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Cash" EntityType="Self.Cash" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="CashRegister" EntityType="Self.CashRegister" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Dates" EntityType="Self.Dates" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Employees" EntityType="Self.Employees" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="PasportDetails" EntityType="Self.PasportDetails" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Payment" EntityType="Self.Payment" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="Revenue" EntityType="Self.Revenue" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="SuppliersProduct" EntityType="Self.SuppliersProduct" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="SupplyProduct" EntityType="Self.SupplyProduct" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="SurrenderOfMoney" EntityType="Self.SurrenderOfMoney" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="WorkingShift" EntityType="Self.WorkingShift" Schema="dbo" store:Type="Tables" />
+          <AssociationSet Name="FK_Address_Employees" Association="Self.FK_Address_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="Address" EntitySet="Address" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CardAmount_Payment" Association="Self.FK_CardAmount_Payment">
+            <End Role="Payment" EntitySet="Payment" />
+            <End Role="CardAmount" EntitySet="CardAmount" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Cash_Payment" Association="Self.FK_Cash_Payment">
+            <End Role="Payment" EntitySet="Payment" />
+            <End Role="Cash" EntitySet="Cash" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Dates" Association="Self.FK_CashRegister_Dates">
+            <End Role="Dates" EntitySet="Dates" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Employees" Association="Self.FK_CashRegister_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Payment" Association="Self.FK_CashRegister_Payment">
+            <End Role="Payment" EntitySet="Payment" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Product" Association="Self.FK_CashRegister_Product">
+            <End Role="Product" EntitySet="Product" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_SurrenderOfMoney" Association="Self.FK_CashRegister_SurrenderOfMoney">
+            <End Role="SurrenderOfMoney" EntitySet="SurrenderOfMoney" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PasportDetails_Employees" Association="Self.FK_PasportDetails_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="PasportDetails" EntitySet="PasportDetails" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Revenue_Employees" Association="Self.FK_Revenue_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="Revenue" EntitySet="Revenue" />
+          </AssociationSet>
+          <AssociationSet Name="FK_SuppliersProduct_SupplyProduct" Association="Self.FK_SuppliersProduct_SupplyProduct">
+            <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+            <End Role="SuppliersProduct" EntitySet="SuppliersProduct" />
+          </AssociationSet>
+          <AssociationSet Name="FK_SupplyProduct_Product" Association="Self.FK_SupplyProduct_Product">
+            <End Role="Product" EntitySet="Product" />
+            <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+          </AssociationSet>
+          <AssociationSet Name="FK_WorkingShift_Employees" Association="Self.FK_WorkingShift_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="WorkingShift" EntitySet="WorkingShift" />
+          </AssociationSet>
+        </EntityContainer>
+      </Schema>
+    </edmx:StorageModels>
+    <!-- CSDL content -->
+    <edmx:ConceptualModels>
+      <Schema Namespace="gr606_sosanModel" Alias="Self" 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/2008/09/edm">
+        <EntityType Name="Address">
+          <Key>
+            <PropertyRef Name="IdAddress" />
+          </Key>
+          <Property Name="IdAddress" Type="Int32" Nullable="false" />
+          <Property Name="Street" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Number" Type="Int32" Nullable="false" />
+          <Property Name="HouseNumber" Type="Int32" Nullable="false" />
+          <Property Name="Flat" Type="Int32" Nullable="false" />
+          <Property Name="IdEmployee" Type="Int32" />
+          <NavigationProperty Name="Employees" Relationship="Self.FK_Address_Employees" FromRole="Address" ToRole="Employees" />
+        </EntityType>
+        <EntityType Name="CardAmount">
+          <Key>
+            <PropertyRef Name="IdCard" />
+          </Key>
+          <Property Name="IdCard" Type="Int32" Nullable="false" />
+          <Property Name="Sum" Type="Decimal" Precision="19" Scale="4" />
+          <Property Name="PaymentName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="IdPay" Type="Int32" />
+          <NavigationProperty Name="Payment" Relationship="Self.FK_CardAmount_Payment" FromRole="CardAmount" ToRole="Payment" />
+        </EntityType>
+        <EntityType Name="Cash">
+          <Key>
+            <PropertyRef Name="IdCash" />
+          </Key>
+          <Property Name="IdCash" Type="Int32" Nullable="false" />
+          <Property Name="Sum" Type="Decimal" Precision="19" Scale="4" />
+          <Property Name="PaymentName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+          <Property Name="IdPay" Type="Int32" />
+          <NavigationProperty Name="Payment" Relationship="Self.FK_Cash_Payment" FromRole="Cash" ToRole="Payment" />
+        </EntityType>
+        <EntityType Name="CashRegister">
+          <Key>
+            <PropertyRef Name="IdCashRegistre" />
+          </Key>
+          <Property Name="IdCashRegistre" Type="Int32" Nullable="false" />
+          <Property Name="IdEmployee" Type="Int32" />
+          <Property Name="IdProduct" Type="Int32" />
+          <Property Name="IdSurrender" Type="Int32" />
+          <Property Name="IdDate" Type="Int32" />
+          <Property Name="IdPay" Type="Int32" />
+          <NavigationProperty Name="Dates" Relationship="Self.FK_CashRegister_Dates" FromRole="CashRegister" ToRole="Dates" />
+          <NavigationProperty Name="Employees" Relationship="Self.FK_CashRegister_Employees" FromRole="CashRegister" ToRole="Employees" />
+          <NavigationProperty Name="Payment" Relationship="Self.FK_CashRegister_Payment" FromRole="CashRegister" ToRole="Payment" />
+          <NavigationProperty Name="Product" Relationship="Self.FK_CashRegister_Product" FromRole="CashRegister" ToRole="Product" />
+          <NavigationProperty Name="SurrenderOfMoney" Relationship="Self.FK_CashRegister_SurrenderOfMoney" FromRole="CashRegister" ToRole="SurrenderOfMoney" />
+        </EntityType>
+        <EntityType Name="Dates">
+          <Key>
+            <PropertyRef Name="IdDate" />
+          </Key>
+          <Property Name="IdDate" Type="Int32" Nullable="false" />
+          <Property Name="Date" Type="DateTime" Precision="0" />
+          <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Dates" FromRole="Dates" ToRole="CashRegister" />
+        </EntityType>
+        <EntityType Name="Employees">
+          <Key>
+            <PropertyRef Name="IdEmployee" />
+          </Key>
+          <Property Name="IdEmployee" Type="Int32" Nullable="false" />
+          <Property Name="Surname" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Patronymic" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="TelephoneNumber" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+          <NavigationProperty Name="Address" Relationship="Self.FK_Address_Employees" FromRole="Employees" ToRole="Address" />
+          <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Employees" FromRole="Employees" ToRole="CashRegister" />
+          <NavigationProperty Name="PasportDetails" Relationship="Self.FK_PasportDetails_Employees" FromRole="Employees" ToRole="PasportDetails" />
+          <NavigationProperty Name="Revenue" Relationship="Self.FK_Revenue_Employees" FromRole="Employees" ToRole="Revenue" />
+          <NavigationProperty Name="WorkingShift" Relationship="Self.FK_WorkingShift_Employees" FromRole="Employees" ToRole="WorkingShift" />
+        </EntityType>
+        <EntityType Name="PasportDetails">
+          <Key>
+            <PropertyRef Name="IdDetail" />
+          </Key>
+          <Property Name="IdDetail" Type="Int32" Nullable="false" />
+          <Property Name="Number" Type="Int32" Nullable="false" />
+          <Property Name="Series" Type="Int32" Nullable="false" />
+          <Property Name="IssuedBy" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="IdEmployee" Type="Int32" />
+          <NavigationProperty Name="Employees" Relationship="Self.FK_PasportDetails_Employees" FromRole="PasportDetails" ToRole="Employees" />
+        </EntityType>
+        <EntityType Name="Payment">
+          <Key>
+            <PropertyRef Name="IdPay" />
+          </Key>
+          <Property Name="IdPay" Type="Int32" Nullable="false" />
+          <Property Name="HistoryAboutPayment" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="CardAmount" Relationship="Self.FK_CardAmount_Payment" FromRole="Payment" ToRole="CardAmount" />
+          <NavigationProperty Name="Cash" Relationship="Self.FK_Cash_Payment" FromRole="Payment" ToRole="Cash" />
+          <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Payment" FromRole="Payment" ToRole="CashRegister" />
+        </EntityType>
+        <EntityType Name="Product">
+          <Key>
+            <PropertyRef Name="IdProduct" />
+          </Key>
+          <Property Name="IdProduct" Type="Int32" Nullable="false" />
+          <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Manufacture" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="ProductGroup" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Cost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+          <Property Name="TypeOfProduct" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Bardcode" Type="Int32" Nullable="false" />
+          <Property Name="Margin" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+          <Property Name="Quantity" Type="Int32" Nullable="false" />
+          <Property Name="Discount" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+          <Property Name="Unit" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="VAT" Type="Decimal" Precision="19" Scale="4" />
+          <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Product" FromRole="Product" ToRole="CashRegister" />
+          <NavigationProperty Name="SupplyProduct" Relationship="Self.FK_SupplyProduct_Product" FromRole="Product" ToRole="SupplyProduct" />
+        </EntityType>
+        <EntityType Name="Revenue">
+          <Key>
+            <PropertyRef Name="IdRevenue" />
+          </Key>
+          <Property Name="IdRevenue" Type="Int32" Nullable="false" />
+          <Property Name="SumRevenue" Type="Decimal" Precision="19" Scale="4" />
+          <Property Name="IdEmployee" Type="Int32" />
+          <NavigationProperty Name="Employees" Relationship="Self.FK_Revenue_Employees" FromRole="Revenue" ToRole="Employees" />
+        </EntityType>
+        <EntityType Name="SuppliersProduct">
+          <Key>
+            <PropertyRef Name="IdSupplier" />
+          </Key>
+          <Property Name="IdSupplier" Type="Int32" Nullable="false" />
+          <Property Name="CompanyName" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="IdSupply" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="SupplyProduct" Relationship="Self.FK_SuppliersProduct_SupplyProduct" FromRole="SuppliersProduct" ToRole="SupplyProduct" />
+        </EntityType>
+        <EntityType Name="SupplyProduct">
+          <Key>
+            <PropertyRef Name="IdSupply" />
+          </Key>
+          <Property Name="IdSupply" Type="Int32" Nullable="false" />
+          <Property Name="QuantityDeliveredProduct" Type="Int32" Nullable="false" />
+          <Property Name="CostDeliveredProduct" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+          <Property Name="IdProduct" Type="Int32" Nullable="false" />
+          <NavigationProperty Name="Product" Relationship="Self.FK_SupplyProduct_Product" FromRole="SupplyProduct" ToRole="Product" />
+          <NavigationProperty Name="SuppliersProduct" Relationship="Self.FK_SuppliersProduct_SupplyProduct" FromRole="SupplyProduct" ToRole="SuppliersProduct" />
+        </EntityType>
+        <EntityType Name="SurrenderOfMoney">
+          <Key>
+            <PropertyRef Name="IdSurrender" />
+          </Key>
+          <Property Name="IdSurrender" Type="Int32" Nullable="false" />
+          <Property Name="Sum" Type="Decimal" Precision="19" Scale="4" />
+          <Property Name="NumberOfChecks" Type="Int32" />
+          <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_SurrenderOfMoney" FromRole="SurrenderOfMoney" ToRole="CashRegister" />
+        </EntityType>
+        <EntityType Name="WorkingShift">
+          <Key>
+            <PropertyRef Name="IdShift" />
+          </Key>
+          <Property Name="IdShift" Type="Int32" Nullable="false" />
+          <Property Name="NameShift" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="IdEmployee" Type="Int32" />
+          <NavigationProperty Name="Employees" Relationship="Self.FK_WorkingShift_Employees" FromRole="WorkingShift" ToRole="Employees" />
+        </EntityType>
+        <Association Name="FK_Address_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="Address" Type="Self.Address" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="Address">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CardAmount_Payment">
+          <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+          <End Role="CardAmount" Type="Self.CardAmount" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Payment">
+              <PropertyRef Name="IdPay" />
+            </Principal>
+            <Dependent Role="CardAmount">
+              <PropertyRef Name="IdPay" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Cash_Payment">
+          <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+          <End Role="Cash" Type="Self.Cash" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Payment">
+              <PropertyRef Name="IdPay" />
+            </Principal>
+            <Dependent Role="Cash">
+              <PropertyRef Name="IdPay" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Dates">
+          <End Role="Dates" Type="Self.Dates" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Dates">
+              <PropertyRef Name="IdDate" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdDate" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Payment">
+          <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Payment">
+              <PropertyRef Name="IdPay" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdPay" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_Product">
+          <End Role="Product" Type="Self.Product" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Product">
+              <PropertyRef Name="IdProduct" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdProduct" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_CashRegister_SurrenderOfMoney">
+          <End Role="SurrenderOfMoney" Type="Self.SurrenderOfMoney" Multiplicity="0..1" />
+          <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="SurrenderOfMoney">
+              <PropertyRef Name="IdSurrender" />
+            </Principal>
+            <Dependent Role="CashRegister">
+              <PropertyRef Name="IdSurrender" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_PasportDetails_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="PasportDetails" Type="Self.PasportDetails" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="PasportDetails">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_Revenue_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="Revenue" Type="Self.Revenue" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="Revenue">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_WorkingShift_Employees">
+          <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+          <End Role="WorkingShift" Type="Self.WorkingShift" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Employees">
+              <PropertyRef Name="IdEmployee" />
+            </Principal>
+            <Dependent Role="WorkingShift">
+              <PropertyRef Name="IdEmployee" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_SupplyProduct_Product">
+          <End Role="Product" Type="Self.Product" Multiplicity="1" />
+          <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Product">
+              <PropertyRef Name="IdProduct" />
+            </Principal>
+            <Dependent Role="SupplyProduct">
+              <PropertyRef Name="IdProduct" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <Association Name="FK_SuppliersProduct_SupplyProduct">
+          <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="1" />
+          <End Role="SuppliersProduct" Type="Self.SuppliersProduct" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="SupplyProduct">
+              <PropertyRef Name="IdSupply" />
+            </Principal>
+            <Dependent Role="SuppliersProduct">
+              <PropertyRef Name="IdSupply" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
+        <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
+          <EntitySet Name="Address" EntityType="Self.Address" />
+          <EntitySet Name="CardAmount" EntityType="Self.CardAmount" />
+          <EntitySet Name="Cash" EntityType="Self.Cash" />
+          <EntitySet Name="CashRegister" EntityType="Self.CashRegister" />
+          <EntitySet Name="Dates" EntityType="Self.Dates" />
+          <EntitySet Name="Employees" EntityType="Self.Employees" />
+          <EntitySet Name="PasportDetails" EntityType="Self.PasportDetails" />
+          <EntitySet Name="Payment" EntityType="Self.Payment" />
+          <EntitySet Name="Product" EntityType="Self.Product" />
+          <EntitySet Name="Revenue" EntityType="Self.Revenue" />
+          <EntitySet Name="SuppliersProduct" EntityType="Self.SuppliersProduct" />
+          <EntitySet Name="SupplyProduct" EntityType="Self.SupplyProduct" />
+          <EntitySet Name="SurrenderOfMoney" EntityType="Self.SurrenderOfMoney" />
+          <EntitySet Name="WorkingShift" EntityType="Self.WorkingShift" />
+          <AssociationSet Name="FK_Address_Employees" Association="Self.FK_Address_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="Address" EntitySet="Address" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CardAmount_Payment" Association="Self.FK_CardAmount_Payment">
+            <End Role="Payment" EntitySet="Payment" />
+            <End Role="CardAmount" EntitySet="CardAmount" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Cash_Payment" Association="Self.FK_Cash_Payment">
+            <End Role="Payment" EntitySet="Payment" />
+            <End Role="Cash" EntitySet="Cash" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Dates" Association="Self.FK_CashRegister_Dates">
+            <End Role="Dates" EntitySet="Dates" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Employees" Association="Self.FK_CashRegister_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Payment" Association="Self.FK_CashRegister_Payment">
+            <End Role="Payment" EntitySet="Payment" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_Product" Association="Self.FK_CashRegister_Product">
+            <End Role="Product" EntitySet="Product" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_CashRegister_SurrenderOfMoney" Association="Self.FK_CashRegister_SurrenderOfMoney">
+            <End Role="SurrenderOfMoney" EntitySet="SurrenderOfMoney" />
+            <End Role="CashRegister" EntitySet="CashRegister" />
+          </AssociationSet>
+          <AssociationSet Name="FK_PasportDetails_Employees" Association="Self.FK_PasportDetails_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="PasportDetails" EntitySet="PasportDetails" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Revenue_Employees" Association="Self.FK_Revenue_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="Revenue" EntitySet="Revenue" />
+          </AssociationSet>
+          <AssociationSet Name="FK_WorkingShift_Employees" Association="Self.FK_WorkingShift_Employees">
+            <End Role="Employees" EntitySet="Employees" />
+            <End Role="WorkingShift" EntitySet="WorkingShift" />
+          </AssociationSet>
+          <AssociationSet Name="FK_SupplyProduct_Product" Association="Self.FK_SupplyProduct_Product">
+            <End Role="Product" EntitySet="Product" />
+            <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+          </AssociationSet>
+          <AssociationSet Name="FK_SuppliersProduct_SupplyProduct" Association="Self.FK_SuppliersProduct_SupplyProduct">
+            <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+            <End Role="SuppliersProduct" EntitySet="SuppliersProduct" />
+          </AssociationSet>
+        </EntityContainer>
+      </Schema>
+    </edmx:ConceptualModels>
+    <!-- C-S mapping content -->
+    <edmx:Mappings>
+      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">
+        <EntityContainerMapping StorageEntityContainer="Хранилище gr606_sosanModelContainer" CdmEntityContainer="Entities">
+          <EntitySetMapping Name="Address">
+            <EntityTypeMapping TypeName="gr606_sosanModel.Address">
+              <MappingFragment StoreEntitySet="Address">
+                <ScalarProperty Name="IdAddress" ColumnName="IdAddress" />
+                <ScalarProperty Name="Street" ColumnName="Street" />
+                <ScalarProperty Name="Number" ColumnName="Number" />
+                <ScalarProperty Name="HouseNumber" ColumnName="HouseNumber" />
+                <ScalarProperty Name="Flat" ColumnName="Flat" />
+                <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="CardAmount">
+            <EntityTypeMapping TypeName="gr606_sosanModel.CardAmount">
+              <MappingFragment StoreEntitySet="CardAmount">
+                <ScalarProperty Name="IdCard" ColumnName="IdCard" />
+                <ScalarProperty Name="Sum" ColumnName="Sum" />
+                <ScalarProperty Name="PaymentName" ColumnName="PaymentName" />
+                <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Cash">
+            <EntityTypeMapping TypeName="gr606_sosanModel.Cash">
+              <MappingFragment StoreEntitySet="Cash">
+                <ScalarProperty Name="IdCash" ColumnName="IdCash" />
+                <ScalarProperty Name="Sum" ColumnName="Sum" />
+                <ScalarProperty Name="PaymentName" ColumnName="PaymentName" />
+                <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="CashRegister">
+            <EntityTypeMapping TypeName="gr606_sosanModel.CashRegister">
+              <MappingFragment StoreEntitySet="CashRegister">
+                <ScalarProperty Name="IdCashRegistre" ColumnName="IdCashRegistre" />
+                <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+                <ScalarProperty Name="IdProduct" ColumnName="IdProduct" />
+                <ScalarProperty Name="IdSurrender" ColumnName="IdSurrender" />
+                <ScalarProperty Name="IdDate" ColumnName="IdDate" />
+                <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Dates">
+            <EntityTypeMapping TypeName="gr606_sosanModel.Dates">
+              <MappingFragment StoreEntitySet="Dates">
+                <ScalarProperty Name="IdDate" ColumnName="IdDate" />
+                <ScalarProperty Name="Date" ColumnName="Date" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Employees">
+            <EntityTypeMapping TypeName="gr606_sosanModel.Employees">
+              <MappingFragment StoreEntitySet="Employees">
+                <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+                <ScalarProperty Name="Surname" ColumnName="Surname" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
+                <ScalarProperty Name="TelephoneNumber" ColumnName="TelephoneNumber" />
+                <ScalarProperty Name="Email" ColumnName="Email" />
+                <ScalarProperty Name="Login" ColumnName="Login" />
+                <ScalarProperty Name="Password" ColumnName="Password" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="PasportDetails">
+            <EntityTypeMapping TypeName="gr606_sosanModel.PasportDetails">
+              <MappingFragment StoreEntitySet="PasportDetails">
+                <ScalarProperty Name="IdDetail" ColumnName="IdDetail" />
+                <ScalarProperty Name="Number" ColumnName="Number" />
+                <ScalarProperty Name="Series" ColumnName="Series" />
+                <ScalarProperty Name="IssuedBy" ColumnName="IssuedBy" />
+                <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Payment">
+            <EntityTypeMapping TypeName="gr606_sosanModel.Payment">
+              <MappingFragment StoreEntitySet="Payment">
+                <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+                <ScalarProperty Name="HistoryAboutPayment" ColumnName="HistoryAboutPayment" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Product">
+            <EntityTypeMapping TypeName="gr606_sosanModel.Product">
+              <MappingFragment StoreEntitySet="Product">
+                <ScalarProperty Name="IdProduct" ColumnName="IdProduct" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="Manufacture" ColumnName="Manufacture" />
+                <ScalarProperty Name="ProductGroup" ColumnName="ProductGroup" />
+                <ScalarProperty Name="Cost" ColumnName="Cost" />
+                <ScalarProperty Name="TypeOfProduct" ColumnName="TypeOfProduct" />
+                <ScalarProperty Name="Bardcode" ColumnName="Bardcode" />
+                <ScalarProperty Name="Margin" ColumnName="Margin" />
+                <ScalarProperty Name="Quantity" ColumnName="Quantity" />
+                <ScalarProperty Name="Discount" ColumnName="Discount" />
+                <ScalarProperty Name="Unit" ColumnName="Unit" />
+                <ScalarProperty Name="VAT" ColumnName="VAT" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="Revenue">
+            <EntityTypeMapping TypeName="gr606_sosanModel.Revenue">
+              <MappingFragment StoreEntitySet="Revenue">
+                <ScalarProperty Name="IdRevenue" ColumnName="IdRevenue" />
+                <ScalarProperty Name="SumRevenue" ColumnName="SumRevenue" />
+                <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="SuppliersProduct">
+            <EntityTypeMapping TypeName="gr606_sosanModel.SuppliersProduct">
+              <MappingFragment StoreEntitySet="SuppliersProduct">
+                <ScalarProperty Name="IdSupplier" ColumnName="IdSupplier" />
+                <ScalarProperty Name="CompanyName" ColumnName="CompanyName" />
+                <ScalarProperty Name="IdSupply" ColumnName="IdSupply" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="SupplyProduct">
+            <EntityTypeMapping TypeName="gr606_sosanModel.SupplyProduct">
+              <MappingFragment StoreEntitySet="SupplyProduct">
+                <ScalarProperty Name="IdSupply" ColumnName="IdSupply" />
+                <ScalarProperty Name="QuantityDeliveredProduct" ColumnName="QuantityDeliveredProduct" />
+                <ScalarProperty Name="CostDeliveredProduct" ColumnName="CostDeliveredProduct" />
+                <ScalarProperty Name="IdProduct" ColumnName="IdProduct" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="SurrenderOfMoney">
+            <EntityTypeMapping TypeName="gr606_sosanModel.SurrenderOfMoney">
+              <MappingFragment StoreEntitySet="SurrenderOfMoney">
+                <ScalarProperty Name="IdSurrender" ColumnName="IdSurrender" />
+                <ScalarProperty Name="Sum" ColumnName="Sum" />
+                <ScalarProperty Name="NumberOfChecks" ColumnName="NumberOfChecks" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+          <EntitySetMapping Name="WorkingShift">
+            <EntityTypeMapping TypeName="gr606_sosanModel.WorkingShift">
+              <MappingFragment StoreEntitySet="WorkingShift">
+                <ScalarProperty Name="IdShift" ColumnName="IdShift" />
+                <ScalarProperty Name="NameShift" ColumnName="NameShift" />
+                <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
+        </EntityContainerMapping>
+      </Mapping>
+    </edmx:Mappings>
+  </edmx:Runtime>
+  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
+    <Connection>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
+      </DesignerInfoPropertySet>
+    </Connection>
+    <Options>
+      <DesignerInfoPropertySet>
+        <DesignerProperty Name="ValidateOnBuild" Value="true" />
+        <DesignerProperty Name="EnablePluralization" Value="false" />
+        <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
+        <DesignerProperty Name="UseLegacyProvider" Value="true" />
+        <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
+      </DesignerInfoPropertySet>
+    </Options>
+    <!-- Diagram content (shape and connector positions) -->
+    <Diagrams></Diagrams>
+  </Designer>
+</edmx:Edmx>

+ 38 - 0
OUP/Model1.edmx.diagram

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">
+ <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
+  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2008/10/edmx">
+    <!-- Diagram content (shape and connector positions) -->
+    <edmx:Diagrams>
+      <Diagram DiagramId="14da3750c4094bb5be241041c40825fa" Name="Diagram1">
+        <EntityTypeShape EntityType="gr606_sosanModel.Address" Width="1.5" PointX="3" PointY="3.5" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.CardAmount" Width="1.5" PointX="6" PointY="4" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.Cash" Width="1.5" PointX="6" PointY="11.75" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.CashRegister" Width="1.5" PointX="6" PointY="7.125" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.Dates" Width="1.5" PointX="3.75" PointY="1" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.Employees" Width="1.5" PointX="0.75" PointY="6.875" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.PasportDetails" Width="1.5" PointX="3" PointY="10.5" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.Payment" Width="1.5" PointX="3.75" PointY="7.375" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.Product" Width="1.5" PointX="3.75" PointY="19.125" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.Revenue" Width="1.5" PointX="3" PointY="13.375" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.SuppliersProduct" Width="1.5" PointX="8.25" PointY="20" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.SupplyProduct" Width="1.5" PointX="6" PointY="19.875" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.SurrenderOfMoney" Width="1.5" PointX="3.75" PointY="23.5" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr606_sosanModel.WorkingShift" Width="1.5" PointX="3" PointY="16" IsExpanded="true" />
+        <AssociationConnector Association="gr606_sosanModel.FK_Address_Employees" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_CardAmount_Payment" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_Cash_Payment" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_CashRegister_Dates" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_CashRegister_Employees" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_CashRegister_Payment" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_CashRegister_Product" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_CashRegister_SurrenderOfMoney" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_PasportDetails_Employees" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_Revenue_Employees" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_WorkingShift_Employees" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_SupplyProduct_Product" ManuallyRouted="false" />
+        <AssociationConnector Association="gr606_sosanModel.FK_SuppliersProduct_SupplyProduct" ManuallyRouted="false" />
+      </Diagram>
+    </edmx:Diagrams>
+  </edmx:Designer>
+</edmx:Edmx>

+ 845 - 0
OUP/Model1.tt

@@ -0,0 +1,845 @@
+<#@ template language="C#" debug="false" hostspecific="true"#>
+<#@ include file="EF.Utility.CS.ttinclude"#><#@ 
+ output extension=".cs"#><#
+
+const string inputFile = @"Model1.edmx";
+var textTransform = DynamicTextTransformation.Create(this);
+var code = new CodeGenerationTools(this);
+var ef = new MetadataTools(this);
+var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
+var	fileManager = EntityFrameworkTemplateFileManager.Create(this);
+var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
+var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
+
+if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
+{
+    return string.Empty;
+}
+
+WriteHeader(codeStringGenerator, fileManager);
+
+foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
+{
+    fileManager.StartNewFile(entity.Name + ".cs");
+    BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
+<#=codeStringGenerator.EntityClassOpening(entity)#>
+{
+<#
+    var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
+    var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
+    var complexProperties = typeMapper.GetComplexProperties(entity);
+
+    if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
+    {
+#>
+    public <#=code.Escape(entity)#>()
+    {
+<#
+        foreach (var edmProperty in propertiesWithDefaultValues)
+        {
+#>
+        this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+        }
+
+        foreach (var navigationProperty in collectionNavigationProperties)
+        {
+#>
+        this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
+<#
+        }
+
+        foreach (var complexProperty in complexProperties)
+        {
+#>
+        this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+        }
+#>
+    }
+
+<#
+    }
+
+    var simpleProperties = typeMapper.GetSimpleProperties(entity);
+    if (simpleProperties.Any())
+    {
+        foreach (var edmProperty in simpleProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(edmProperty)#>
+<#
+        }
+    }
+
+    if (complexProperties.Any())
+    {
+#>
+
+<#
+        foreach(var complexProperty in complexProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(complexProperty)#>
+<#
+        }
+    }
+
+    var navigationProperties = typeMapper.GetNavigationProperties(entity);
+    if (navigationProperties.Any())
+    {
+#>
+
+<#
+        foreach (var navigationProperty in navigationProperties)
+        {
+#>
+    <#=codeStringGenerator.NavigationProperty(navigationProperty)#>
+<#
+        }
+    }
+#>
+}
+<#
+    EndNamespace(code);
+}
+
+foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
+{
+    fileManager.StartNewFile(complex.Name + ".cs");
+    BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
+{
+<#
+    var complexProperties = typeMapper.GetComplexProperties(complex);
+    var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
+
+    if (propertiesWithDefaultValues.Any() || complexProperties.Any())
+    {
+#>
+    public <#=code.Escape(complex)#>()
+    {
+<#
+        foreach (var edmProperty in propertiesWithDefaultValues)
+        {
+#>
+        this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
+<#
+        }
+
+        foreach (var complexProperty in complexProperties)
+        {
+#>
+        this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
+<#
+        }
+#>
+    }
+
+<#
+    }
+
+    var simpleProperties = typeMapper.GetSimpleProperties(complex);
+    if (simpleProperties.Any())
+    {
+        foreach(var edmProperty in simpleProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(edmProperty)#>
+<#
+        }
+    }
+
+    if (complexProperties.Any())
+    {
+#>
+
+<#
+        foreach(var edmProperty in complexProperties)
+        {
+#>
+    <#=codeStringGenerator.Property(edmProperty)#>
+<#
+        }
+    }
+#>
+}
+<#
+    EndNamespace(code);
+}
+
+foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
+{
+    fileManager.StartNewFile(enumType.Name + ".cs");
+    BeginNamespace(code);
+#>
+<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
+<#
+    if (typeMapper.EnumIsFlags(enumType))
+    {
+#>
+[Flags]
+<#
+    }
+#>
+<#=codeStringGenerator.EnumOpening(enumType)#>
+{
+<#
+    var foundOne = false;
+    
+    foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
+    {
+        foundOne = true;
+#>
+    <#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
+<#
+    }
+
+    if (foundOne)
+    {
+        this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
+    }
+#>
+}
+<#
+    EndNamespace(code);
+}
+
+fileManager.Process();
+
+#>
+<#+
+
+public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
+{
+    fileManager.StartHeader();
+#>
+//------------------------------------------------------------------------------
+// <auto-generated>
+// <#=GetResourceString("Template_GeneratedCodeCommentLine1")#>
+//
+// <#=GetResourceString("Template_GeneratedCodeCommentLine2")#>
+// <#=GetResourceString("Template_GeneratedCodeCommentLine3")#>
+// </auto-generated>
+//------------------------------------------------------------------------------
+<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
+<#+
+    fileManager.EndBlock();
+}
+
+public void BeginNamespace(CodeGenerationTools code)
+{
+    var codeNamespace = code.VsNamespaceSuggestion();
+    if (!String.IsNullOrEmpty(codeNamespace))
+    {
+#>
+namespace <#=code.EscapeNamespace(codeNamespace)#>
+{
+<#+
+        PushIndent("    ");
+    }
+}
+
+public void EndNamespace(CodeGenerationTools code)
+{
+    if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
+    {
+        PopIndent();
+#>
+}
+<#+
+    }
+}
+
+public const string TemplateId = "CSharp_DbContext_Types_EF5";
+
+public class CodeStringGenerator
+{
+    private readonly CodeGenerationTools _code;
+    private readonly TypeMapper _typeMapper;
+    private readonly MetadataTools _ef;
+
+    public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(typeMapper, "typeMapper");
+        ArgumentNotNull(ef, "ef");
+
+        _code = code;
+        _typeMapper = typeMapper;
+        _ef = ef;
+    }
+
+    public string Property(EdmProperty edmProperty)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            Accessibility.ForProperty(edmProperty),
+            _typeMapper.GetTypeName(edmProperty.TypeUsage),
+            _code.Escape(edmProperty),
+            _code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
+            _code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
+    }
+
+    public string NavigationProperty(NavigationProperty navigationProperty)
+    {
+        var endType = _typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType());
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2} {{ {3}get; {4}set; }}",
+            AccessibilityAndVirtual(Accessibility.ForProperty(navigationProperty)),
+            navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
+            _code.Escape(navigationProperty),
+            _code.SpaceAfter(Accessibility.ForGetter(navigationProperty)),
+            _code.SpaceAfter(Accessibility.ForSetter(navigationProperty)));
+    }
+    
+    public string AccessibilityAndVirtual(string accessibility)
+    {
+        return accessibility + (accessibility != "private" ? " virtual" : "");
+    }
+    
+    public string EntityClassOpening(EntityType entity)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1}partial class {2}{3}",
+            Accessibility.ForType(entity),
+            _code.SpaceAfter(_code.AbstractOption(entity)),
+            _code.Escape(entity),
+            _code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
+    }
+    
+    public string EnumOpening(SimpleType enumType)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} enum {1} : {2}",
+            Accessibility.ForType(enumType),
+            _code.Escape(enumType),
+            _code.Escape(_typeMapper.UnderlyingClrType(enumType)));
+        }
+    
+    public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
+    {
+        var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+        foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
+        {
+            var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
+            var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
+            var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + parameter.RawClrTypeName + "))";
+            writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
+        }
+    }
+    
+    public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} IQueryable<{1}> {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            _code.Escape(edmFunction),
+            string.Join(", ", parameters.Select(p => p.FunctionParameterType + " " + p.FunctionParameterName).ToArray()));
+    }
+    
+    public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
+            _typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
+            edmFunction.NamespaceName,
+            edmFunction.Name,
+            string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
+            _code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
+    }
+    
+    public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var paramList = String.Join(", ", parameters.Select(p => p.FunctionParameterType + " " + p.FunctionParameterName).ToArray());
+        if (includeMergeOption)
+        {
+            paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
+        }
+
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} {1} {2}({3})",
+            AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
+            returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            _code.Escape(edmFunction),
+            paramList);
+    }
+    
+    public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
+    {
+        var parameters = _typeMapper.GetParameters(edmFunction);
+        var returnType = _typeMapper.GetReturnType(edmFunction);
+
+        var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
+        if (includeMergeOption)
+        {
+            callParams = ", mergeOption" + callParams;
+        }
+        
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
+            returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
+            edmFunction.Name,
+            callParams);
+    }
+    
+    public string DbSet(EntitySet entitySet)
+    {
+        return string.Format(
+            CultureInfo.InvariantCulture,
+            "{0} DbSet<{1}> {2} {{ get; set; }}",
+            Accessibility.ForReadOnlyProperty(entitySet),
+            _typeMapper.GetTypeName(entitySet.ElementType),
+            _code.Escape(entitySet));
+    }
+
+    public string UsingDirectives(bool inHeader, bool includeCollections = true)
+    {
+        return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
+            ? string.Format(
+                CultureInfo.InvariantCulture,
+                "{0}using System;{1}" +
+                "{2}",
+                inHeader ? Environment.NewLine : "",
+                includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
+                inHeader ? "" : Environment.NewLine)
+            : "";
+    }
+}
+
+public class TypeMapper
+{
+    private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
+
+    private readonly System.Collections.IList _errors;
+    private readonly CodeGenerationTools _code;
+    private readonly MetadataTools _ef;
+
+    public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
+    {
+        ArgumentNotNull(code, "code");
+        ArgumentNotNull(ef, "ef");
+        ArgumentNotNull(errors, "errors");
+
+        _code = code;
+        _ef = ef;
+        _errors = errors;
+    }
+
+    public string GetTypeName(TypeUsage typeUsage)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
+    }
+
+    public string GetTypeName(EdmType edmType)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: null);
+    }
+
+    public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
+    {
+        return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, string modelNamespace)
+    {
+        return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
+    }
+
+    public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
+    {
+        if (edmType == null)
+        {
+            return null;
+        }
+
+        var collectionType = edmType as CollectionType;
+        if (collectionType != null)
+        {
+            return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
+        }
+
+        var typeName = _code.Escape(edmType.MetadataProperties
+                                .Where(p => p.Name == ExternalTypeNameAttributeName)
+                                .Select(p => (string)p.Value)
+                                .FirstOrDefault())
+            ?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
+                _code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
+                _code.Escape(edmType));
+
+        if (edmType is StructuralType)
+        {
+            return typeName;
+        }
+
+        if (edmType is SimpleType)
+        {
+            var clrType = UnderlyingClrType(edmType);
+            if (!IsEnumType(edmType))
+            {
+                typeName = _code.Escape(clrType);
+            }
+
+            return clrType.IsValueType && isNullable == true ?
+                String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
+                typeName;
+        }
+
+        throw new ArgumentException("edmType");
+    }
+    
+    public Type UnderlyingClrType(EdmType edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        var primitiveType = edmType as PrimitiveType;
+        if (primitiveType != null)
+        {
+            return primitiveType.ClrEquivalentType;
+        }
+
+        if (IsEnumType(edmType))
+        {
+            return GetEnumUnderlyingType(edmType).ClrEquivalentType;
+        }
+
+        return typeof(object);
+    }
+    
+    public object GetEnumMemberValue(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var valueProperty = enumMember.GetType().GetProperty("Value");
+        return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
+    }
+    
+    public string GetEnumMemberName(MetadataItem enumMember)
+    {
+        ArgumentNotNull(enumMember, "enumMember");
+        
+        var nameProperty = enumMember.GetType().GetProperty("Name");
+        return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
+    }
+
+    public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        var membersProperty = enumType.GetType().GetProperty("Members");
+        return membersProperty != null 
+            ? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
+            : Enumerable.Empty<MetadataItem>();
+    }
+    
+    public bool EnumIsFlags(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+        
+        var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
+        return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
+    }
+
+    public bool IsEnumType(GlobalItem edmType)
+    {
+        ArgumentNotNull(edmType, "edmType");
+
+        return edmType.GetType().Name == "EnumType";
+    }
+
+    public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
+    {
+        ArgumentNotNull(enumType, "enumType");
+
+        return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
+    }
+
+    public string CreateLiteral(object value)
+    {
+        if (value == null || value.GetType() != typeof(TimeSpan))
+        {
+            return _code.CreateLiteral(value);
+        }
+
+        return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
+    }
+    
+    public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
+    {
+        ArgumentNotNull(types, "types");
+        ArgumentNotNull(sourceFile, "sourceFile");
+        
+        var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
+        if (types.Any(item => !hash.Add(item)))
+        {
+            _errors.Add(
+                new CompilerError(sourceFile, -1, -1, "6023",
+                    String.Format(CultureInfo.CurrentCulture, GetResourceString("Template_CaseInsensitiveTypeConflict"))));
+            return false;
+        }
+        return true;
+    }
+    
+    public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
+    {
+        return GetItemsToGenerate<SimpleType>(itemCollection)
+            .Where(e => IsEnumType(e));
+    }
+    
+    public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
+    {
+        return itemCollection
+            .OfType<T>()
+            .Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
+            .OrderBy(i => i.Name);
+    }
+
+    public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
+    {
+        return itemCollection
+            .Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
+            .Select(g => GetGlobalItemName(g));
+    }
+
+    public string GetGlobalItemName(GlobalItem item)
+    {
+        if (item is EdmType)
+        {
+            return ((EdmType)item).Name;
+        }
+        else
+        {
+            return ((EntityContainer)item).Name;
+        }
+    }
+
+    public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+    
+    public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
+    }
+
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+    
+    public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
+    {
+        return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
+    }
+
+    public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type);
+    }
+    
+    public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
+    {
+        return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+    }
+    
+    public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
+        return returnParamsProperty == null
+            ? edmFunction.ReturnParameter
+            : ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
+    }
+
+    public bool IsComposable(EdmFunction edmFunction)
+    {
+        ArgumentNotNull(edmFunction, "edmFunction");
+
+        var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
+        return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
+    }
+
+    public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
+    {
+        return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
+    }
+
+    public TypeUsage GetReturnType(EdmFunction edmFunction)
+    {
+        var returnParam = GetReturnParameter(edmFunction);
+        return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
+    }
+    
+    public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
+    {
+        var returnType = GetReturnType(edmFunction);
+        return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
+    }
+}
+
+public class EdmMetadataLoader
+{
+    private readonly IDynamicHost _host;
+    private readonly System.Collections.IList _errors;
+
+    public EdmMetadataLoader(IDynamicHost host, System.Collections.IList errors)
+    {
+        ArgumentNotNull(host, "host");
+        ArgumentNotNull(errors, "errors");
+
+        _host = host;
+        _errors = errors;
+    }
+
+    public IEnumerable<GlobalItem> CreateEdmItemCollection(string sourcePath)
+    {
+        ArgumentNotNull(sourcePath, "sourcePath");
+
+        if (!ValidateInputPath(sourcePath))
+        {
+            return new EdmItemCollection();
+        }
+
+        var schemaElement = LoadRootElement(_host.ResolvePath(sourcePath));
+        if (schemaElement != null)
+        {
+            using (var reader = schemaElement.CreateReader())
+            {
+                IList<EdmSchemaError> errors;
+                var itemCollection = MetadataItemCollectionFactory.CreateEdmItemCollection(new[] { reader }, out errors);
+
+                ProcessErrors(errors, sourcePath);
+
+                return itemCollection;
+            }
+        }
+        return new EdmItemCollection();
+    }
+
+    public string GetModelNamespace(string sourcePath)
+    {
+        ArgumentNotNull(sourcePath, "sourcePath");
+
+        if (!ValidateInputPath(sourcePath))
+        {
+            return string.Empty;
+        }
+
+        var model = LoadRootElement(_host.ResolvePath(sourcePath));
+        if (model == null)
+        {
+            return string.Empty;
+        }
+
+        var attribute = model.Attribute("Namespace");
+        return attribute != null ? attribute.Value : "";
+    }
+
+    private bool ValidateInputPath(string sourcePath)
+    {
+        if (sourcePath == "$" + "edmxInputFile" + "$")
+        {
+            _errors.Add(
+                new CompilerError(_host.TemplateFile ?? sourcePath, 0, 0, string.Empty,
+                    GetResourceString("Template_ReplaceVsItemTemplateToken")));
+            return false;
+        }
+
+        return true;
+    }
+
+    public XElement LoadRootElement(string sourcePath)
+    {
+        ArgumentNotNull(sourcePath, "sourcePath");
+
+        var root = XElement.Load(sourcePath, LoadOptions.SetBaseUri | LoadOptions.SetLineInfo);
+        return root.Elements()
+            .Where(e => e.Name.LocalName == "Runtime")
+            .Elements()
+            .Where(e => e.Name.LocalName == "ConceptualModels")
+            .Elements()
+            .Where(e => e.Name.LocalName == "Schema")
+            .FirstOrDefault()
+                ?? root;
+    }
+
+    private void ProcessErrors(IEnumerable<EdmSchemaError> errors, string sourceFilePath)
+    {
+        foreach (var error in errors)
+        {
+            _errors.Add(
+                new CompilerError(
+                    error.SchemaLocation ?? sourceFilePath,
+                    error.Line,
+                    error.Column,
+                    error.ErrorCode.ToString(CultureInfo.InvariantCulture),
+                    error.Message)
+                {
+                    IsWarning = error.Severity == EdmSchemaErrorSeverity.Warning
+                });
+        }
+    }
+    
+    public bool IsLazyLoadingEnabled(EntityContainer container)
+    {
+        string lazyLoadingAttributeValue;
+        var lazyLoadingAttributeName = MetadataConstants.EDM_ANNOTATION_09_02 + ":LazyLoadingEnabled";
+        bool isLazyLoading;
+        return !MetadataTools.TryGetStringMetadataPropertySetting(container, lazyLoadingAttributeName, out lazyLoadingAttributeValue)
+            || !bool.TryParse(lazyLoadingAttributeValue, out isLazyLoading)
+            || isLazyLoading;
+    }
+}
+
+public static void ArgumentNotNull<T>(T arg, string name) where T : class
+{
+    if (arg == null)
+    {
+        throw new ArgumentNullException(name);
+    }
+}
+    
+private static readonly Lazy<System.Resources.ResourceManager> ResourceManager =
+    new Lazy<System.Resources.ResourceManager>(
+        () => new System.Resources.ResourceManager("System.Data.Entity.Design", typeof(MetadataItemCollectionFactory).Assembly), isThreadSafe: true);
+
+public static string GetResourceString(string resourceName)
+{
+    ArgumentNotNull(resourceName, "resourceName");
+
+    return ResourceManager.Value.GetString(resourceName, null);
+}
+
+#>

+ 342 - 0
OUP/OUP.csproj

@@ -0,0 +1,342 @@
+<?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>{99CF6337-2A5D-4296-AFD9-10EEAB74EBB2}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>OUP</RootNamespace>
+    <AssemblyName>OUP</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <TargetFrameworkProfile />
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </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=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <HintPath>..\packages\EntityFramework.4.3.0\lib\net40\EntityFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.1\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Data.SqlClient, Version=1.13.20136.2, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Data.SqlClient.1.1.3\lib\net46\Microsoft.Data.SqlClient.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.EntityFrameworkCore, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.EntityFrameworkCore.3.1.25\lib\netstandard2.0\Microsoft.EntityFrameworkCore.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.EntityFrameworkCore.Abstractions, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.EntityFrameworkCore.Abstractions.3.1.25\lib\netstandard2.0\Microsoft.EntityFrameworkCore.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.EntityFrameworkCore.Relational, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.EntityFrameworkCore.Relational.3.1.25\lib\netstandard2.0\Microsoft.EntityFrameworkCore.Relational.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.EntityFrameworkCore.SqlServer, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.EntityFrameworkCore.SqlServer.3.1.25\lib\netstandard2.0\Microsoft.EntityFrameworkCore.SqlServer.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Caching.Abstractions, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Caching.Abstractions.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Caching.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Caching.Memory, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Caching.Memory.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Caching.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.Binder, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.Binder.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.DependencyInjection, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.3.1.25\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.3.1.25\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Logging, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Logging.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Options, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Options.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Primitives, Version=3.1.25.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Primitives.3.1.25\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Identity.Client, Version=3.0.8.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Identity.Client.3.0.8\lib\net45\Microsoft.Identity.Client.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.5.5.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Logging, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.IdentityModel.Logging.5.5.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Protocols, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.IdentityModel.Protocols.5.5.0\lib\net461\Microsoft.IdentityModel.Protocols.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.5.5.0\lib\net461\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IdentityModel.Tokens, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.IdentityModel.Tokens.5.5.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <HintPath>..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Collections.Immutable, Version=1.2.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Collections.Immutable.1.7.1\lib\net461\System.Collections.Immutable.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Configuration.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Configuration.ConfigurationManager.4.4.0\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Data.Common, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Data.Common.4.3.0\lib\net451\System.Data.Common.dll</HintPath>
+      <Private>True</Private>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System.Data.Entity" />
+    <Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.IdentityModel" />
+    <Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.IdentityModel.Tokens.Jwt.5.5.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Security" />
+    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Compile Include="Address.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="CardAmount.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Cash.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="CashRegister.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Context.cs" />
+    <Compile Include="Dates.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Employees.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="ForOUP\Descriptions.cs" />
+    <Compile Include="Helper.cs" />
+    <Compile Include="MainViewModel.cs" />
+    <Compile Include="Model1.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="OUP.xaml.cs">
+      <DependentUpon>OUP.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="PasportDetails.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Payment.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Product.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Product2.cs" />
+    <Compile Include="Qwerty.xaml.cs">
+      <DependentUpon>Qwerty.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="RelayCommand.cs" />
+    <Compile Include="Revenue.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Services\FileService.cs" />
+    <Compile Include="Sign in.xaml.cs">
+      <DependentUpon>Sign in.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="SuppliersProduct.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="SupplyProduct.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="SurrenderOfMoney.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Compile Include="ViewModel.cs" />
+    <Compile Include="WorkingShift.cs">
+      <DependentUpon>Model1.tt</DependentUpon>
+    </Compile>
+    <Page Include="MainWindow.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="BaseViewModel.cs" />
+    <Compile Include="ClassMain.cs" />
+    <Compile Include="MainWindow.xaml.cs">
+      <DependentUpon>MainWindow.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Page Include="OUP.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Qwerty.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Sign in.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Model1.Context.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Model1.Context.tt</DependentUpon>
+    </Compile>
+    <Compile Include="Model1.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Model1.edmx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <EntityDeploy Include="Model1.edmx">
+      <Generator>EntityModelCodeGenerator</Generator>
+      <LastGenOutput>Model1.Designer.cs</LastGenOutput>
+    </EntityDeploy>
+    <None Include="Model1.edmx.diagram">
+      <DependentUpon>Model1.edmx</DependentUpon>
+    </None>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Model1.Context.tt">
+      <Generator>TextTemplatingFileGenerator</Generator>
+      <LastGenOutput>Model1.Context.cs</LastGenOutput>
+      <DependentUpon>Model1.edmx</DependentUpon>
+    </Content>
+    <Content Include="Model1.tt">
+      <Generator>TextTemplatingFileGenerator</Generator>
+      <DependentUpon>Model1.edmx</DependentUpon>
+      <LastGenOutput>Model1.cs</LastGenOutput>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets" Condition="Exists('..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их.  Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets'))" />
+  </Target>
+</Project>

+ 20 - 0
OUP/OUP.xaml

@@ -0,0 +1,20 @@
+<Window x:Class="OUP.OUP"
+        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:OUP"
+        mc:Ignorable="d"
+        Title="OUP" Height="450" Width="800" Loaded="Window_Loaded">
+    <Grid>
+        <DataGrid x:Name="Supply" FontSize="16" FontWeight="Bold" Margin="10" AutoGenerateColumns="False">
+            <DataGrid.Columns>
+                <DataGridTextColumn Binding="{Binding Path = Product}" IsReadOnly="False" Header="Product" Width="150"/>
+                <DataGridTextColumn Binding="{Binding Path = Date}" IsReadOnly="True" Header="Date" Width="180"/>
+                <DataGridCheckBoxColumn  Binding="{Binding Path = IsDone, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="False" Header="Delivered?" Width="120"/>
+                <DataGridTextColumn Binding="{Binding Path = Description}" IsReadOnly="False" Header="Description" Width="*"/>
+            </DataGrid.Columns>
+        </DataGrid>
+
+    </Grid>
+</Window>

+ 70 - 0
OUP/OUP.xaml.cs

@@ -0,0 +1,70 @@
+using OUP.ForOUP;
+using OUP.Services;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+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 OUP
+{
+    /// <summary>
+    /// Логика взаимодействия для OUP.xaml
+    /// </summary>
+    public partial class OUP : Window
+    {
+        private readonly string PATH = $"{Environment.CurrentDirectory}\\todoDataList";
+        private BindingList<Descriptions> _todoDataList;
+        private FileService _fileService;
+        public OUP()
+        {
+            InitializeComponent();
+        }
+
+        
+
+        private void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+            _fileService = new FileService(PATH);
+            try
+            {
+                _todoDataList = _fileService.LoadData();
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+               Close();
+            }
+           
+            Supply.ItemsSource = _todoDataList;
+            _todoDataList.ListChanged += _todoDataList_ListChanged;
+        }
+
+        private void _todoDataList_ListChanged(object sender, ListChangedEventArgs e)
+        {
+
+            if (e.ListChangedType == ListChangedType.ItemAdded || e.ListChangedType == ListChangedType.ItemDeleted || e.ListChangedType == ListChangedType.ItemChanged)
+            {
+                try
+                {
+                    _fileService.SaveData(sender);
+                }
+                catch (Exception ex)
+                {
+                    MessageBox.Show(ex.Message);
+                    Close();
+                }
+
+            }
+        }
+    }
+}

+ 25 - 0
OUP/PasportDetails.cs

@@ -0,0 +1,25 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class PasportDetails
+    {
+        public int IdDetail { get; set; }
+        public int Number { get; set; }
+        public int Series { get; set; }
+        public string IssuedBy { get; set; }
+        public Nullable<int> IdEmployee { get; set; }
+    
+        public virtual Employees Employees { get; set; }
+    }
+}

+ 31 - 0
OUP/Payment.cs

@@ -0,0 +1,31 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Payment
+    {
+        public Payment()
+        {
+            this.CardAmount = new HashSet<CardAmount>();
+            this.Cash = new HashSet<Cash>();
+            this.CashRegister = new HashSet<CashRegister>();
+        }
+    
+        public int IdPay { get; set; }
+        public string HistoryAboutPayment { get; set; }
+    
+        public virtual ICollection<CardAmount> CardAmount { get; set; }
+        public virtual ICollection<Cash> Cash { get; set; }
+        public virtual ICollection<CashRegister> CashRegister { get; set; }
+    }
+}

+ 39 - 0
OUP/Product.cs

@@ -0,0 +1,39 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Product
+    {
+        public Product()
+        {
+            this.CashRegister = new HashSet<CashRegister>();
+            this.SupplyProduct = new HashSet<SupplyProduct>();
+        }
+    
+        public int IdProduct { get; set; }
+        public string Name { get; set; }
+        public string Manufacture { get; set; }
+        public string ProductGroup { get; set; }
+        public decimal Cost { get; set; }
+        public string TypeOfProduct { get; set; }
+        public int Bardcode { get; set; }
+        public decimal Margin { get; set; }
+        public int Quantity { get; set; }
+        public decimal Discount { get; set; }
+        public string Unit { get; set; }
+        public Nullable<decimal> VAT { get; set; }
+    
+        public virtual ICollection<CashRegister> CashRegister { get; set; }
+        public virtual ICollection<SupplyProduct> SupplyProduct { get; set; }
+    }
+}

+ 17 - 0
OUP/Product2.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OUP
+{
+    public class Product2
+    {
+        public int Id { get; set; }
+        public string Name { get; set; }
+        public decimal Price { get; set; }
+        public string Supplier { get; set; }
+        public string Dates { get; set; }
+    }
+}

+ 55 - 0
OUP/Properties/AssemblyInfo.cs

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набор атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("OUP")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("OUP")]
+[assembly: AssemblyCopyright("Copyright ©  2022")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// из модели COM, установите атрибут ComVisible для этого типа в значение true.
+[assembly: ComVisible(false)]
+
+//Чтобы начать создание локализуемых приложений, задайте
+//<UICulture>CultureYouAreCodingWith</UICulture> в файле .csproj
+//в <PropertyGroup>. Например, при использовании английского (США)
+//в своих исходных файлах установите <UICulture> в en-US.  Затем отмените преобразование в комментарий
+//атрибута NeutralResourceLanguage ниже.  Обновите "en-US" в
+//строка внизу для обеспечения соответствия настройки UICulture в файле проекта.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //где расположены словари ресурсов по конкретным тематикам
+                                     //(используется, если ресурс не найден на странице,
+                                     // или в словарях ресурсов приложения)
+    ResourceDictionaryLocation.SourceAssembly //где расположен словарь универсальных ресурсов
+                                              //(используется, если ресурс не найден на странице,
+                                              // в приложении или в каких-либо словарях ресурсов для конкретной темы)
+)]
+
+
+// Сведения о версии для сборки включают четыре следующих значения:
+//
+//      Основной номер версии
+//      Дополнительный номер версии
+//      Номер сборки
+//      Номер редакции
+//
+// Можно задать все значения или принять номера сборки и редакции по умолчанию 
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 63 - 0
OUP/Properties/Resources.Designer.cs

@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
+    /// </summary>
+    // Этот класс создан автоматически классом StronglyTypedResourceBuilder
+    // с помощью такого средства, как ResGen или Visual Studio.
+    // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
+    // с параметром /str или перестройте свой проект VS.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OUP.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Перезаписывает свойство CurrentUICulture текущего потока для всех
+        ///   обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
OUP/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 26 - 0
OUP/Properties/Settings.Designer.cs

@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
OUP/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 54 - 0
OUP/Qwerty.xaml

@@ -0,0 +1,54 @@
+<Window x:Class="OUP.Qwerty"
+        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:OUP"
+        mc:Ignorable="d"
+        Title="Qwerty" Height="450" Width="800">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition/>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="50"/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <DataGrid Grid.Row="1" Name="ProductsGrid" AutoGenerateColumns="False" IsReadOnly="True" ColumnWidth="*">
+            <DataGrid.Columns>
+                <DataGridTextColumn Header="Продукт" Binding="{Binding Product2.Name}"></DataGridTextColumn>
+                <DataGridTextColumn Header="Цена" Binding="{Binding Product2.Price}"></DataGridTextColumn>
+                <DataGridTextColumn Header="Поставщик" Binding="{Binding Product2.Supplier }"></DataGridTextColumn>
+                <DataGridTextColumn Header="Дата поставки" Binding="{Binding Product2.Dates}"></DataGridTextColumn>
+
+            </DataGrid.Columns>
+        </DataGrid>
+        <Button Height="30" Width="150" Name="Btndelete" Click="BtnDelete_Click" HorizontalAlignment="Center" Content="Удалить" Grid.Column="1" Margin="0,5,0,15"></Button>
+        <Grid Grid.Column="1" Grid.Row="1">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <ColumnDefinition Width="*"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition/>
+                <RowDefinition/>
+                <RowDefinition/>
+                <RowDefinition/>
+                <RowDefinition/>
+            </Grid.RowDefinitions>
+            <TextBlock Text="Продукт" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="157,0,0,0"></TextBlock>
+            <TextBlock Text="Цена" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Grid.ColumnSpan="2" Margin="184,38,0,0"></TextBlock>
+            <TextBlock Text="Производитель" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="2" Grid.ColumnSpan="2" Margin="170,0,0,0"></TextBlock>
+            <TextBlock Text="Дата" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="3" Grid.ColumnSpan="2" Margin="183,39,0,0"></TextBlock>
+            <TextBox VerticalAlignment="Top" Name="TbProduct" Grid.ColumnSpan="2" Margin="100,59,100,0" Grid.RowSpan="2"/>
+            <TextBox VerticalAlignment="Top" Name="TbPrice" Grid.Row="1" Grid.ColumnSpan="2" Margin="100,59,100,0" Grid.RowSpan="2"/>
+            <TextBox VerticalAlignment="Top" Name="TbSupplier" Grid.Row="2" Grid.ColumnSpan="2" Margin="98,58,102,0"/>
+            <TextBox VerticalAlignment="Top" Name="TbDate" Grid.Row="3" Grid.ColumnSpan="2" Margin="100,59,100,0"/>
+            <Button Grid.Row="4" Name="BtnInsert" Click="BtnInsert_Click" Height="30" Width="150" Content="Добавить"></Button>
+            <Button Grid.Column="1" Grid.Row="4" Name="BtnUpdate" Click="BtnUpdate_Click" Height="30" Width="150" Content="Обновить"></Button>
+        </Grid>
+
+
+    </Grid>
+</Window>

+ 90 - 0
OUP/Qwerty.xaml.cs

@@ -0,0 +1,90 @@
+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 OUP
+{
+    public partial class Qwerty : Window
+    {
+       
+            private Context _context;
+            public Qwerty()
+            {
+                InitializeComponent();
+                _context = new Context();
+                Load();
+            }
+            private void Load()
+            {
+                ProductsGrid.ItemsSource = _context.products.ToList();
+            }
+            private void BtnInsert_Click(object sender, RoutedEventArgs e)
+            {
+                if (!decimal.TryParse(TbPrice.Text, out decimal price))
+                {
+                    return;
+                }
+                Product2 product = new Product2()
+                {
+                    Name = TbProduct.Text,
+                    Price = price,
+                    Supplier = TbSupplier.Text,
+                    Dates = TbDate.Text,
+
+                };
+             //   _context.products.Add(product);
+                _context.SaveChanges();
+                Load();
+            }
+            private void BtnUpdate_Click(object sender, RoutedEventArgs e)
+            {
+                if (ProductsGrid.SelectedItem is Product2 selectedProduct2)
+                {
+                    if (!decimal.TryParse(TbPrice.Text, out decimal price))
+                    {
+                        return;
+                    }
+                selectedProduct2.Name = TbProduct.Text;
+                selectedProduct2.Price = price;
+                selectedProduct2.Supplier = TbSupplier.Text;
+                selectedProduct2.Dates = TbDate.Text;
+                    _context.SaveChanges();
+                    Load();
+                }
+
+            }
+            private void BtnDelete_Click(object sender, RoutedEventArgs e)
+            {
+                if (ProductsGrid.SelectedItem is Product2 selectedproducts)
+                {
+                    //_context.products.Remove(selectedproducts);
+                    _context.SaveChanges();
+                    Load();
+                }
+
+            }
+            private void BooksGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
+            {
+                if (ProductsGrid.SelectedItem is Product2 selectedproducts)
+                {
+                    TbProduct.Text = selectedproducts.Name;
+                    TbPrice.Text = selectedproducts.Price.ToString();
+                    TbSupplier.Text = selectedproducts.Supplier;
+                    TbDate.Text = selectedproducts.Dates;
+                }
+
+            }
+
+        
+    }
+}

+ 35 - 0
OUP/RelayCommand.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+
+namespace OUP
+{
+    public class RelayCommand : ICommand
+    {
+        private Action<object> _execute;
+        private Func<object, bool> _canExecute;
+
+        public event EventHandler CanExecuteChanged
+        {
+            add { CommandManager.RequerySuggested += value; }
+            remove { CommandManager.RequerySuggested -= value; }
+        }
+        public RelayCommand(Action<object> execute, Func<object, bool> canExecute = null)
+        {
+            this._execute = execute;
+            this._canExecute = canExecute;
+        }
+        public bool CanExecute(object parameter)
+        {
+            return this._canExecute == null || this._canExecute(parameter);
+        }
+
+        public void Execute(object parameter)
+        {
+            this._execute(parameter);
+        }
+    }
+}

+ 23 - 0
OUP/Revenue.cs

@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class Revenue
+    {
+        public int IdRevenue { get; set; }
+        public Nullable<decimal> SumRevenue { get; set; }
+        public Nullable<int> IdEmployee { get; set; }
+    
+        public virtual Employees Employees { get; set; }
+    }
+}

+ 50 - 0
OUP/Services/FileService.cs

@@ -0,0 +1,50 @@
+using Newtonsoft.Json;
+using OUP.ForOUP;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OUP.Services
+{
+    class FileService
+    {
+
+        private readonly string PATH;
+
+        public FileService(string path)
+        {
+            PATH = path;
+        }
+        public BindingList<Descriptions> LoadData()
+        {
+
+            var fileExists = File.Exists(PATH);
+            if (!fileExists)
+            {
+                File.CreateText(PATH).Dispose();
+                return new BindingList<Descriptions>();
+
+            }
+            using (var reader = File.OpenText(PATH))
+            {
+                var fileText = reader.ReadToEnd();
+                return JsonConvert.DeserializeObject<BindingList<Descriptions>>(fileText);
+
+            }
+        }
+
+        public void SaveData(object todoDataList)
+        {
+            using (StreamWriter writer = File.CreateText(PATH))
+            {
+                string output = JsonConvert.SerializeObject(todoDataList);
+                    writer.Write(output);
+            }
+
+        }
+    }
+}

+ 25 - 0
OUP/Sign in.xaml

@@ -0,0 +1,25 @@
+<Window x:Class="OUP.Sign_in"
+        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:OUP"
+        mc:Ignorable="d"
+        Title="Sign_in" Height="450" Width="400">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition/>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition/>
+            <RowDefinition/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <TextBlock Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center" Text="Логин"></TextBlock>
+        <TextBlock Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1" Text="Пароль"></TextBlock>
+        <TextBox Grid.Column="1" VerticalAlignment="Center" Margin="5" Text="{Binding Login}"></TextBox>
+        <TextBox Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Margin="5" Text="{Binding Password}"></TextBox>
+        <Button  Height="30" Width="150" Margin="5" Content="Войти" Grid.Column="1" Grid.Row="2" Command="{Binding AuthCommand}" Click="Button_Click"></Button>
+    </Grid>
+</Window>

+ 34 - 0
OUP/Sign in.xaml.cs

@@ -0,0 +1,34 @@
+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 OUP
+{
+    /// <summary>
+    /// Логика взаимодействия для Sign_in.xaml
+    /// </summary>
+    public partial class Sign_in : Window
+    {
+        public Sign_in()
+        {
+            InitializeComponent();
+            DataContext = new MainViewModel();
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            OUP Window1 = new OUP();
+            Window1.Show();
+        }
+    }
+}

+ 23 - 0
OUP/SuppliersProduct.cs

@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class SuppliersProduct
+    {
+        public int IdSupplier { get; set; }
+        public string CompanyName { get; set; }
+        public int IdSupply { get; set; }
+    
+        public virtual SupplyProduct SupplyProduct { get; set; }
+    }
+}

+ 30 - 0
OUP/SupplyProduct.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class SupplyProduct
+    {
+        public SupplyProduct()
+        {
+            this.SuppliersProduct = new HashSet<SuppliersProduct>();
+        }
+    
+        public int IdSupply { get; set; }
+        public int QuantityDeliveredProduct { get; set; }
+        public decimal CostDeliveredProduct { get; set; }
+        public int IdProduct { get; set; }
+    
+        public virtual Product Product { get; set; }
+        public virtual ICollection<SuppliersProduct> SuppliersProduct { get; set; }
+    }
+}

+ 28 - 0
OUP/SurrenderOfMoney.cs

@@ -0,0 +1,28 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class SurrenderOfMoney
+    {
+        public SurrenderOfMoney()
+        {
+            this.CashRegister = new HashSet<CashRegister>();
+        }
+    
+        public int IdSurrender { get; set; }
+        public Nullable<decimal> Sum { get; set; }
+        public Nullable<int> NumberOfChecks { get; set; }
+    
+        public virtual ICollection<CashRegister> CashRegister { get; set; }
+    }
+}

+ 64 - 0
OUP/ViewModel.cs

@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OUP
+{
+    public class ViewModel : BaseViewModel
+    {
+
+        private RelayCommand _submitCommand;
+
+        public RelayCommand SubmitCommand
+        {
+            get
+            {
+                return _submitCommand ??
+                    (_submitCommand = new RelayCommand(x =>
+                    {
+                        if (_product.IdProduct == 0)
+                        {
+                           
+                            Helper.GetContext().Product.Add(_product);
+
+                        }
+                        Helper.GetContext().SaveChanges();
+
+                    }));
+            }
+        }
+
+
+        private Product _product;
+        private ObservableCollection<Product> _products;
+
+        public ObservableCollection<Product> Products
+        {
+            get => _products;
+            set
+            {
+                _products = value;
+                OnPropertyChanged();
+            }
+        }
+        public Product Product
+        {
+            get => _product;
+            set
+            {
+                _product = value;
+                OnPropertyChanged();
+            }
+        }
+        public ViewModel(Product product)
+        {
+            _product = product;
+            _products = new ObservableCollection<Product>(Helper.GetContext().Product);
+        }
+
+
+    }
+}

+ 23 - 0
OUP/WorkingShift.cs

@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//    Этот код был создан из шаблона.
+//
+//    Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//    Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OUP
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class WorkingShift
+    {
+        public int IdShift { get; set; }
+        public string NameShift { get; set; }
+        public Nullable<int> IdEmployee { get; set; }
+    
+        public virtual Employees Employees { get; set; }
+    }
+}

BIN
OUP/bin/Debug/EntityFramework.dll


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 17531 - 0
OUP/bin/Debug/EntityFramework.xml


BIN
OUP/bin/Debug/OUP.exe


+ 13 - 0
OUP/bin/Debug/OUP.exe.config

@@ -0,0 +1,13 @@
+<?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=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  </configSections>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+  </startup>
+  <connectionStrings>
+    <add name="Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=mssql;initial catalog=gr606_sosan;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
+</configuration>

BIN
OUP/bin/Debug/OUP.pdb


+ 4 - 0
OUP/obj/Debug/.NETFramework,Version=v4.6.1.AssemblyAttributes.cs

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

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

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

+ 4 - 0
OUP/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs

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

+ 70 - 0
OUP/obj/Debug/App.g.cs

@@ -0,0 +1,70 @@
+#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "107E8E75789D0EF39CF99FE8D6496D6C4A7F4499A698DB5DA936B1B504FD97DA"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// App
+    /// </summary>
+    public partial class App : System.Windows.Application {
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            
+            #line 5 "..\..\App.xaml"
+            this.StartupUri = new System.Uri("OUP.xaml", System.UriKind.Relative);
+            
+            #line default
+            #line hidden
+        }
+        
+        /// <summary>
+        /// Application Entry Point.
+        /// </summary>
+        [System.STAThreadAttribute()]
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public static void Main() {
+            OUP.App app = new OUP.App();
+            app.InitializeComponent();
+            app.Run();
+        }
+    }
+}
+

+ 70 - 0
OUP/obj/Debug/App.g.i.cs

@@ -0,0 +1,70 @@
+#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "107E8E75789D0EF39CF99FE8D6496D6C4A7F4499A698DB5DA936B1B504FD97DA"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// App
+    /// </summary>
+    public partial class App : System.Windows.Application {
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            
+            #line 5 "..\..\App.xaml"
+            this.StartupUri = new System.Uri("OUP.xaml", System.UriKind.Relative);
+            
+            #line default
+            #line hidden
+        }
+        
+        /// <summary>
+        /// Application Entry Point.
+        /// </summary>
+        [System.STAThreadAttribute()]
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public static void Main() {
+            OUP.App app = new OUP.App();
+            app.InitializeComponent();
+            app.Run();
+        }
+    }
+}
+

BIN
OUP/obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
OUP/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 86 - 0
OUP/obj/Debug/MainWindow.g.cs

@@ -0,0 +1,86 @@
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "61487B8293945055D205A51E71D3E81915197D3F34DD7F3FFDBE64D32E442651"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// MainWindow
+    /// </summary>
+    public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/OUP;component/mainwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\MainWindow.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:
+            
+            #line 37 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 86 - 0
OUP/obj/Debug/MainWindow.g.i.cs

@@ -0,0 +1,86 @@
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "61487B8293945055D205A51E71D3E81915197D3F34DD7F3FFDBE64D32E442651"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// MainWindow
+    /// </summary>
+    public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/OUP;component/mainwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\MainWindow.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:
+            
+            #line 37 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

BIN
OUP/obj/Debug/OUP.Properties.Resources.resources


BIN
OUP/obj/Debug/OUP.csproj.AssemblyReference.cache


+ 0 - 0
OUP/obj/Debug/OUP.csproj.CopyComplete


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

@@ -0,0 +1 @@
+f29521b6c166706d2319d9a8944318c3513ec967

+ 60 - 0
OUP/obj/Debug/OUP.csproj.FileListAbsolute.txt

@@ -0,0 +1,60 @@
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.csproj.AssemblyReference.cache
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.csproj.SuggestedBindingRedirects.cache
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\MainWindow.g.cs
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\Sign in.g.cs
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\App.g.cs
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP_Content.g.cs
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.cache
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.lref
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\bin\Debug\OUP.exe.config
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\bin\Debug\OUP.exe
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\bin\Debug\OUP.pdb
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\bin\Debug\EntityFramework.dll
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\bin\Debug\EntityFramework.xml
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\MainWindow.baml
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\Sign in.baml
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.g.resources
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.Properties.Resources.resources
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.csproj.GenerateResource.cache
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.csproj.CoreCompileInputs.cache
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.csproj.CopyComplete
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.exe
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\OUP.pdb
+C:\Users\gr606_sosan\Desktop\OUP\OUP\OUP\obj\Debug\Qwerty.g.cs
+Z:\OUP\OUP\OUP\obj\Debug\OUP.csproj.AssemblyReference.cache
+Z:\OUP\OUP\OUP\obj\Debug\OUP.csproj.SuggestedBindingRedirects.cache
+Z:\OUP\OUP\OUP\obj\Debug\MainWindow.g.cs
+Z:\OUP\OUP\OUP\obj\Debug\Qwerty.g.cs
+Z:\OUP\OUP\OUP\obj\Debug\Sign in.g.cs
+Z:\OUP\OUP\OUP\obj\Debug\App.g.cs
+Z:\OUP\OUP\OUP\obj\Debug\OUP_Content.g.cs
+Z:\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.cache
+Z:\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.lref
+Z:\OUP\OUP\OUP\obj\Debug\OUP.exe
+Z:\OUP\OUP\OUP\obj\Debug\OUP.pdb
+M:\OUP\OUP\OUP\obj\Debug\OUP.csproj.AssemblyReference.cache
+M:\OUP\OUP\OUP\obj\Debug\OUP.exe.config
+M:\OUP\OUP\OUP\obj\Debug\MainWindow.g.cs
+M:\OUP\OUP\OUP\obj\Debug\OUP.g.cs
+M:\OUP\OUP\OUP\obj\Debug\Qwerty.g.cs
+M:\OUP\OUP\OUP\obj\Debug\Sign in.g.cs
+M:\OUP\OUP\OUP\obj\Debug\App.g.cs
+M:\OUP\OUP\OUP\obj\Debug\OUP_Content.g.cs
+M:\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.cache
+M:\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.lref
+M:\OUP\OUP\OUP\obj\Debug\OUP.exe
+M:\OUP\OUP\OUP\obj\Debug\OUP.pdb
+X:\OUP\OUP\OUP\obj\Debug\OUP.csproj.AssemblyReference.cache
+X:\OUP\OUP\OUP\obj\Debug\OUP.csproj.SuggestedBindingRedirects.cache
+X:\OUP\OUP\OUP\obj\Debug\OUP.exe
+X:\OUP\OUP\OUP\obj\Debug\OUP.pdb
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\OUP.csproj.AssemblyReference.cache
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\OUP.exe.config
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\MainWindow.g.cs
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\OUP.g.cs
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\Qwerty.g.cs
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\Sign in.g.cs
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\App.g.cs
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\OUP_Content.g.cs
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.cache
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\OUP_MarkupCompile.lref

BIN
OUP/obj/Debug/OUP.csproj.GenerateResource.cache


+ 0 - 0
OUP/obj/Debug/OUP.csproj.SuggestedBindingRedirects.cache


+ 379 - 0
OUP/obj/Debug/OUP.exe.config

@@ -0,0 +1,379 @@
+<?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=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  </configSections>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+  </startup>
+  <connectionStrings>
+    <add name="Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=mssql;initial catalog=gr606_sosan;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Configuration.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Caching.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-3.1.25.0" newVersion="3.1.25.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Collections.Concurrent" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Collections" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.ComponentModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.ComponentModel.EventBasedAsync" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Data.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Diagnostics.Contracts" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Diagnostics.Debug" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Diagnostics.Tools" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Diagnostics.Tracing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Dynamic.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Globalization" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Globalization.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Linq" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Linq.Expressions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Linq.Parallel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Linq.Queryable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Net.NetworkInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Net.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Net.Requests" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Net.Sockets" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Reflection.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Reflection.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Resources.ResourceManager" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.Numerics" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.Serialization.Json" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.Serialization.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.Serialization.Xml" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.3.0" newVersion="4.1.3.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Security.Principal" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Security.SecureString" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Encoding.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.RegularExpressions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Overlapped" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Tasks.Parallel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Threading.Timer" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Xml.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Xml.XmlSerializer" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.11.0" newVersion="4.0.11.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 97 - 0
OUP/obj/Debug/OUP.g.cs

@@ -0,0 +1,97 @@
+#pragma checksum "..\..\OUP.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1D90B47C6D3B0381D436A2892348F774E285D84048A86836BBCDB7EDC7F920B8"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// OUP
+    /// </summary>
+    public partial class OUP : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 10 "..\..\OUP.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid Supply;
+        
+        #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("/OUP;component/oup.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\OUP.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:
+            
+            #line 8 "..\..\OUP.xaml"
+            ((OUP.OUP)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.Supply = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 97 - 0
OUP/obj/Debug/OUP.g.i.cs

@@ -0,0 +1,97 @@
+#pragma checksum "..\..\OUP.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1D90B47C6D3B0381D436A2892348F774E285D84048A86836BBCDB7EDC7F920B8"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// OUP
+    /// </summary>
+    public partial class OUP : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 10 "..\..\OUP.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid Supply;
+        
+        #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("/OUP;component/oup.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\OUP.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:
+            
+            #line 8 "..\..\OUP.xaml"
+            ((OUP.OUP)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.Supply = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

BIN
OUP/obj/Debug/OUP.g.resources


+ 14 - 0
OUP/obj/Debug/OUP_Content.g.cs

@@ -0,0 +1,14 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model1.context.tt")]
+[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model1.tt")]
+
+

+ 14 - 0
OUP/obj/Debug/OUP_Content.g.i.cs

@@ -0,0 +1,14 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model1.context.tt")]
+[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model1.tt")]
+
+

+ 20 - 0
OUP/obj/Debug/OUP_MarkupCompile.cache

@@ -0,0 +1,20 @@
+OUP
+
+
+winexe
+C#
+.cs
+C:\Users\Papa\Desktop\OUP\OUP\OUP\obj\Debug\
+OUP
+none
+false
+DEBUG;TRACE
+C:\Users\Papa\Desktop\OUP\OUP\OUP\App.xaml
+4-767221082
+21750853300
+35-1995084678
+163-1403356985
+MainWindow.xaml;OUP.xaml;Qwerty.xaml;Sign in.xaml;
+
+True
+

+ 20 - 0
OUP/obj/Debug/OUP_MarkupCompile.i.cache

@@ -0,0 +1,20 @@
+OUP
+
+
+winexe
+C#
+.cs
+M:\OUP\OUP\OUP\obj\Debug\
+OUP
+none
+false
+DEBUG;TRACE
+M:\OUP\OUP\OUP\App.xaml
+4-767221082
+21750853300
+36-1027157617
+163-1453051980
+MainWindow.xaml;OUP.xaml;Qwerty.xaml;Sign in.xaml;
+
+False
+

+ 7 - 0
OUP/obj/Debug/OUP_MarkupCompile.lref

@@ -0,0 +1,7 @@
+
+
+FC:\Users\Papa\Desktop\OUP\OUP\OUP\MainWindow.xaml;;
+FC:\Users\Papa\Desktop\OUP\OUP\OUP\OUP.xaml;;
+FC:\Users\Papa\Desktop\OUP\OUP\OUP\Qwerty.xaml;;
+FC:\Users\Papa\Desktop\OUP\OUP\OUP\Sign in.xaml;;
+

+ 184 - 0
OUP/obj/Debug/Qwerty.g.cs

@@ -0,0 +1,184 @@
+#pragma checksum "..\..\Qwerty.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D21A051EBDB00777679660EA66E6DB23562A9B0B1E3FCE35560C99DDC54618A0"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// Qwerty
+    /// </summary>
+    public partial class Qwerty : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 18 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid ProductsGrid;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 27 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Btndelete;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 44 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbProduct;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 45 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbPrice;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 46 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbSupplier;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 47 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbDate;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 48 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnInsert;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 49 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnUpdate;
+        
+        #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("/OUP;component/qwerty.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\Qwerty.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.ProductsGrid = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 2:
+            this.Btndelete = ((System.Windows.Controls.Button)(target));
+            
+            #line 27 "..\..\Qwerty.xaml"
+            this.Btndelete.Click += new System.Windows.RoutedEventHandler(this.BtnDelete_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.TbProduct = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 4:
+            this.TbPrice = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 5:
+            this.TbSupplier = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 6:
+            this.TbDate = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 7:
+            this.BtnInsert = ((System.Windows.Controls.Button)(target));
+            
+            #line 48 "..\..\Qwerty.xaml"
+            this.BtnInsert.Click += new System.Windows.RoutedEventHandler(this.BtnInsert_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 8:
+            this.BtnUpdate = ((System.Windows.Controls.Button)(target));
+            
+            #line 49 "..\..\Qwerty.xaml"
+            this.BtnUpdate.Click += new System.Windows.RoutedEventHandler(this.BtnUpdate_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 184 - 0
OUP/obj/Debug/Qwerty.g.i.cs

@@ -0,0 +1,184 @@
+#pragma checksum "..\..\Qwerty.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D21A051EBDB00777679660EA66E6DB23562A9B0B1E3FCE35560C99DDC54618A0"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// Qwerty
+    /// </summary>
+    public partial class Qwerty : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 18 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid ProductsGrid;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 27 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button Btndelete;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 44 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbProduct;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 45 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbPrice;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 46 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbSupplier;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 47 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TbDate;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 48 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnInsert;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 49 "..\..\Qwerty.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnUpdate;
+        
+        #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("/OUP;component/qwerty.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\Qwerty.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.ProductsGrid = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 2:
+            this.Btndelete = ((System.Windows.Controls.Button)(target));
+            
+            #line 27 "..\..\Qwerty.xaml"
+            this.Btndelete.Click += new System.Windows.RoutedEventHandler(this.BtnDelete_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.TbProduct = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 4:
+            this.TbPrice = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 5:
+            this.TbSupplier = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 6:
+            this.TbDate = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 7:
+            this.BtnInsert = ((System.Windows.Controls.Button)(target));
+            
+            #line 48 "..\..\Qwerty.xaml"
+            this.BtnInsert.Click += new System.Windows.RoutedEventHandler(this.BtnInsert_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 8:
+            this.BtnUpdate = ((System.Windows.Controls.Button)(target));
+            
+            #line 49 "..\..\Qwerty.xaml"
+            this.BtnUpdate.Click += new System.Windows.RoutedEventHandler(this.BtnUpdate_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 86 - 0
OUP/obj/Debug/Sign in.g.cs

@@ -0,0 +1,86 @@
+#pragma checksum "..\..\Sign in.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F578A9804BE45EFBC405497AE5B997D289276A730D55C05FDE1FF0FB3E6DD74F"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// Sign_in
+    /// </summary>
+    public partial class Sign_in : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/OUP;component/sign%20in.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\Sign in.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:
+            
+            #line 23 "..\..\Sign in.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 86 - 0
OUP/obj/Debug/Sign in.g.i.cs

@@ -0,0 +1,86 @@
+#pragma checksum "..\..\Sign in.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F578A9804BE45EFBC405497AE5B997D289276A730D55C05FDE1FF0FB3E6DD74F"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using OUP;
+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 OUP {
+    
+    
+    /// <summary>
+    /// Sign_in
+    /// </summary>
+    public partial class Sign_in : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/OUP;component/sign%20in.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\Sign in.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:
+            
+            #line 23 "..\..\Sign in.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 0 - 0
OUP/obj/Debug/TempPE/Model1.Context.cs.dll


BIN
OUP/obj/Debug/TempPE/Model1.Designer.cs.dll


BIN
OUP/obj/Debug/TempPE/Model1.cs.dll


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


+ 388 - 0
OUP/obj/Debug/edmxResourcesToEmbed/Model1.csdl

@@ -0,0 +1,388 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Schema Namespace="gr606_sosanModel" Alias="Self" 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/2008/09/edm">
+  <EntityType Name="Address">
+    <Key>
+      <PropertyRef Name="IdAddress" />
+    </Key>
+    <Property Name="IdAddress" Type="Int32" Nullable="false" />
+    <Property Name="Street" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Number" Type="Int32" Nullable="false" />
+    <Property Name="HouseNumber" Type="Int32" Nullable="false" />
+    <Property Name="Flat" Type="Int32" Nullable="false" />
+    <Property Name="IdEmployee" Type="Int32" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_Address_Employees" FromRole="Address" ToRole="Employees" />
+  </EntityType>
+  <EntityType Name="CardAmount">
+    <Key>
+      <PropertyRef Name="IdCard" />
+    </Key>
+    <Property Name="IdCard" Type="Int32" Nullable="false" />
+    <Property Name="Sum" Type="Decimal" Precision="19" Scale="4" />
+    <Property Name="PaymentName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="IdPay" Type="Int32" />
+    <NavigationProperty Name="Payment" Relationship="Self.FK_CardAmount_Payment" FromRole="CardAmount" ToRole="Payment" />
+  </EntityType>
+  <EntityType Name="Cash">
+    <Key>
+      <PropertyRef Name="IdCash" />
+    </Key>
+    <Property Name="IdCash" Type="Int32" Nullable="false" />
+    <Property Name="Sum" Type="Decimal" Precision="19" Scale="4" />
+    <Property Name="PaymentName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
+    <Property Name="IdPay" Type="Int32" />
+    <NavigationProperty Name="Payment" Relationship="Self.FK_Cash_Payment" FromRole="Cash" ToRole="Payment" />
+  </EntityType>
+  <EntityType Name="CashRegister">
+    <Key>
+      <PropertyRef Name="IdCashRegistre" />
+    </Key>
+    <Property Name="IdCashRegistre" Type="Int32" Nullable="false" />
+    <Property Name="IdEmployee" Type="Int32" />
+    <Property Name="IdProduct" Type="Int32" />
+    <Property Name="IdSurrender" Type="Int32" />
+    <Property Name="IdDate" Type="Int32" />
+    <Property Name="IdPay" Type="Int32" />
+    <NavigationProperty Name="Dates" Relationship="Self.FK_CashRegister_Dates" FromRole="CashRegister" ToRole="Dates" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_CashRegister_Employees" FromRole="CashRegister" ToRole="Employees" />
+    <NavigationProperty Name="Payment" Relationship="Self.FK_CashRegister_Payment" FromRole="CashRegister" ToRole="Payment" />
+    <NavigationProperty Name="Product" Relationship="Self.FK_CashRegister_Product" FromRole="CashRegister" ToRole="Product" />
+    <NavigationProperty Name="SurrenderOfMoney" Relationship="Self.FK_CashRegister_SurrenderOfMoney" FromRole="CashRegister" ToRole="SurrenderOfMoney" />
+  </EntityType>
+  <EntityType Name="Dates">
+    <Key>
+      <PropertyRef Name="IdDate" />
+    </Key>
+    <Property Name="IdDate" Type="Int32" Nullable="false" />
+    <Property Name="Date" Type="DateTime" Precision="0" />
+    <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Dates" FromRole="Dates" ToRole="CashRegister" />
+  </EntityType>
+  <EntityType Name="Employees">
+    <Key>
+      <PropertyRef Name="IdEmployee" />
+    </Key>
+    <Property Name="IdEmployee" Type="Int32" Nullable="false" />
+    <Property Name="Surname" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Patronymic" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="TelephoneNumber" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <NavigationProperty Name="Address" Relationship="Self.FK_Address_Employees" FromRole="Employees" ToRole="Address" />
+    <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Employees" FromRole="Employees" ToRole="CashRegister" />
+    <NavigationProperty Name="PasportDetails" Relationship="Self.FK_PasportDetails_Employees" FromRole="Employees" ToRole="PasportDetails" />
+    <NavigationProperty Name="Revenue" Relationship="Self.FK_Revenue_Employees" FromRole="Employees" ToRole="Revenue" />
+    <NavigationProperty Name="WorkingShift" Relationship="Self.FK_WorkingShift_Employees" FromRole="Employees" ToRole="WorkingShift" />
+  </EntityType>
+  <EntityType Name="PasportDetails">
+    <Key>
+      <PropertyRef Name="IdDetail" />
+    </Key>
+    <Property Name="IdDetail" Type="Int32" Nullable="false" />
+    <Property Name="Number" Type="Int32" Nullable="false" />
+    <Property Name="Series" Type="Int32" Nullable="false" />
+    <Property Name="IssuedBy" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="IdEmployee" Type="Int32" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_PasportDetails_Employees" FromRole="PasportDetails" ToRole="Employees" />
+  </EntityType>
+  <EntityType Name="Payment">
+    <Key>
+      <PropertyRef Name="IdPay" />
+    </Key>
+    <Property Name="IdPay" Type="Int32" Nullable="false" />
+    <Property Name="HistoryAboutPayment" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
+    <NavigationProperty Name="CardAmount" Relationship="Self.FK_CardAmount_Payment" FromRole="Payment" ToRole="CardAmount" />
+    <NavigationProperty Name="Cash" Relationship="Self.FK_Cash_Payment" FromRole="Payment" ToRole="Cash" />
+    <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Payment" FromRole="Payment" ToRole="CashRegister" />
+  </EntityType>
+  <EntityType Name="Product">
+    <Key>
+      <PropertyRef Name="IdProduct" />
+    </Key>
+    <Property Name="IdProduct" Type="Int32" Nullable="false" />
+    <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Manufacture" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="ProductGroup" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Cost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+    <Property Name="TypeOfProduct" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Bardcode" Type="Int32" Nullable="false" />
+    <Property Name="Margin" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+    <Property Name="Quantity" Type="Int32" Nullable="false" />
+    <Property Name="Discount" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+    <Property Name="Unit" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="VAT" Type="Decimal" Precision="19" Scale="4" />
+    <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_Product" FromRole="Product" ToRole="CashRegister" />
+    <NavigationProperty Name="SupplyProduct" Relationship="Self.FK_SupplyProduct_Product" FromRole="Product" ToRole="SupplyProduct" />
+  </EntityType>
+  <EntityType Name="Revenue">
+    <Key>
+      <PropertyRef Name="IdRevenue" />
+    </Key>
+    <Property Name="IdRevenue" Type="Int32" Nullable="false" />
+    <Property Name="SumRevenue" Type="Decimal" Precision="19" Scale="4" />
+    <Property Name="IdEmployee" Type="Int32" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_Revenue_Employees" FromRole="Revenue" ToRole="Employees" />
+  </EntityType>
+  <EntityType Name="SuppliersProduct">
+    <Key>
+      <PropertyRef Name="IdSupplier" />
+    </Key>
+    <Property Name="IdSupplier" Type="Int32" Nullable="false" />
+    <Property Name="CompanyName" Type="String" MaxLength="255" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="IdSupply" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="SupplyProduct" Relationship="Self.FK_SuppliersProduct_SupplyProduct" FromRole="SuppliersProduct" ToRole="SupplyProduct" />
+  </EntityType>
+  <EntityType Name="SupplyProduct">
+    <Key>
+      <PropertyRef Name="IdSupply" />
+    </Key>
+    <Property Name="IdSupply" Type="Int32" Nullable="false" />
+    <Property Name="QuantityDeliveredProduct" Type="Int32" Nullable="false" />
+    <Property Name="CostDeliveredProduct" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+    <Property Name="IdProduct" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="Product" Relationship="Self.FK_SupplyProduct_Product" FromRole="SupplyProduct" ToRole="Product" />
+    <NavigationProperty Name="SuppliersProduct" Relationship="Self.FK_SuppliersProduct_SupplyProduct" FromRole="SupplyProduct" ToRole="SuppliersProduct" />
+  </EntityType>
+  <EntityType Name="SurrenderOfMoney">
+    <Key>
+      <PropertyRef Name="IdSurrender" />
+    </Key>
+    <Property Name="IdSurrender" Type="Int32" Nullable="false" />
+    <Property Name="Sum" Type="Decimal" Precision="19" Scale="4" />
+    <Property Name="NumberOfChecks" Type="Int32" />
+    <NavigationProperty Name="CashRegister" Relationship="Self.FK_CashRegister_SurrenderOfMoney" FromRole="SurrenderOfMoney" ToRole="CashRegister" />
+  </EntityType>
+  <EntityType Name="WorkingShift">
+    <Key>
+      <PropertyRef Name="IdShift" />
+    </Key>
+    <Property Name="IdShift" Type="Int32" Nullable="false" />
+    <Property Name="NameShift" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="IdEmployee" Type="Int32" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_WorkingShift_Employees" FromRole="WorkingShift" ToRole="Employees" />
+  </EntityType>
+  <Association Name="FK_Address_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="Address" Type="Self.Address" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="Address">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CardAmount_Payment">
+    <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+    <End Role="CardAmount" Type="Self.CardAmount" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Payment">
+        <PropertyRef Name="IdPay" />
+      </Principal>
+      <Dependent Role="CardAmount">
+        <PropertyRef Name="IdPay" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Cash_Payment">
+    <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+    <End Role="Cash" Type="Self.Cash" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Payment">
+        <PropertyRef Name="IdPay" />
+      </Principal>
+      <Dependent Role="Cash">
+        <PropertyRef Name="IdPay" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Dates">
+    <End Role="Dates" Type="Self.Dates" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Dates">
+        <PropertyRef Name="IdDate" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdDate" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Payment">
+    <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Payment">
+        <PropertyRef Name="IdPay" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdPay" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Product">
+    <End Role="Product" Type="Self.Product" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Product">
+        <PropertyRef Name="IdProduct" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdProduct" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_SurrenderOfMoney">
+    <End Role="SurrenderOfMoney" Type="Self.SurrenderOfMoney" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="SurrenderOfMoney">
+        <PropertyRef Name="IdSurrender" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdSurrender" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_PasportDetails_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="PasportDetails" Type="Self.PasportDetails" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="PasportDetails">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Revenue_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="Revenue" Type="Self.Revenue" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="Revenue">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_WorkingShift_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="WorkingShift" Type="Self.WorkingShift" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="WorkingShift">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_SupplyProduct_Product">
+    <End Role="Product" Type="Self.Product" Multiplicity="1" />
+    <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Product">
+        <PropertyRef Name="IdProduct" />
+      </Principal>
+      <Dependent Role="SupplyProduct">
+        <PropertyRef Name="IdProduct" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_SuppliersProduct_SupplyProduct">
+    <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="1" />
+    <End Role="SuppliersProduct" Type="Self.SuppliersProduct" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="SupplyProduct">
+        <PropertyRef Name="IdSupply" />
+      </Principal>
+      <Dependent Role="SuppliersProduct">
+        <PropertyRef Name="IdSupply" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
+    <EntitySet Name="Address" EntityType="Self.Address" />
+    <EntitySet Name="CardAmount" EntityType="Self.CardAmount" />
+    <EntitySet Name="Cash" EntityType="Self.Cash" />
+    <EntitySet Name="CashRegister" EntityType="Self.CashRegister" />
+    <EntitySet Name="Dates" EntityType="Self.Dates" />
+    <EntitySet Name="Employees" EntityType="Self.Employees" />
+    <EntitySet Name="PasportDetails" EntityType="Self.PasportDetails" />
+    <EntitySet Name="Payment" EntityType="Self.Payment" />
+    <EntitySet Name="Product" EntityType="Self.Product" />
+    <EntitySet Name="Revenue" EntityType="Self.Revenue" />
+    <EntitySet Name="SuppliersProduct" EntityType="Self.SuppliersProduct" />
+    <EntitySet Name="SupplyProduct" EntityType="Self.SupplyProduct" />
+    <EntitySet Name="SurrenderOfMoney" EntityType="Self.SurrenderOfMoney" />
+    <EntitySet Name="WorkingShift" EntityType="Self.WorkingShift" />
+    <AssociationSet Name="FK_Address_Employees" Association="Self.FK_Address_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="Address" EntitySet="Address" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CardAmount_Payment" Association="Self.FK_CardAmount_Payment">
+      <End Role="Payment" EntitySet="Payment" />
+      <End Role="CardAmount" EntitySet="CardAmount" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Cash_Payment" Association="Self.FK_Cash_Payment">
+      <End Role="Payment" EntitySet="Payment" />
+      <End Role="Cash" EntitySet="Cash" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Dates" Association="Self.FK_CashRegister_Dates">
+      <End Role="Dates" EntitySet="Dates" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Employees" Association="Self.FK_CashRegister_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Payment" Association="Self.FK_CashRegister_Payment">
+      <End Role="Payment" EntitySet="Payment" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Product" Association="Self.FK_CashRegister_Product">
+      <End Role="Product" EntitySet="Product" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_SurrenderOfMoney" Association="Self.FK_CashRegister_SurrenderOfMoney">
+      <End Role="SurrenderOfMoney" EntitySet="SurrenderOfMoney" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_PasportDetails_Employees" Association="Self.FK_PasportDetails_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="PasportDetails" EntitySet="PasportDetails" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Revenue_Employees" Association="Self.FK_Revenue_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="Revenue" EntitySet="Revenue" />
+    </AssociationSet>
+    <AssociationSet Name="FK_WorkingShift_Employees" Association="Self.FK_WorkingShift_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="WorkingShift" EntitySet="WorkingShift" />
+    </AssociationSet>
+    <AssociationSet Name="FK_SupplyProduct_Product" Association="Self.FK_SupplyProduct_Product">
+      <End Role="Product" EntitySet="Product" />
+      <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+    </AssociationSet>
+    <AssociationSet Name="FK_SuppliersProduct_SupplyProduct" Association="Self.FK_SuppliersProduct_SupplyProduct">
+      <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+      <End Role="SuppliersProduct" EntitySet="SuppliersProduct" />
+    </AssociationSet>
+  </EntityContainer>
+</Schema>

+ 154 - 0
OUP/obj/Debug/edmxResourcesToEmbed/Model1.msl

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">
+  <EntityContainerMapping StorageEntityContainer="Хранилище gr606_sosanModelContainer" CdmEntityContainer="Entities">
+    <EntitySetMapping Name="Address">
+      <EntityTypeMapping TypeName="gr606_sosanModel.Address">
+        <MappingFragment StoreEntitySet="Address">
+          <ScalarProperty Name="IdAddress" ColumnName="IdAddress" />
+          <ScalarProperty Name="Street" ColumnName="Street" />
+          <ScalarProperty Name="Number" ColumnName="Number" />
+          <ScalarProperty Name="HouseNumber" ColumnName="HouseNumber" />
+          <ScalarProperty Name="Flat" ColumnName="Flat" />
+          <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="CardAmount">
+      <EntityTypeMapping TypeName="gr606_sosanModel.CardAmount">
+        <MappingFragment StoreEntitySet="CardAmount">
+          <ScalarProperty Name="IdCard" ColumnName="IdCard" />
+          <ScalarProperty Name="Sum" ColumnName="Sum" />
+          <ScalarProperty Name="PaymentName" ColumnName="PaymentName" />
+          <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Cash">
+      <EntityTypeMapping TypeName="gr606_sosanModel.Cash">
+        <MappingFragment StoreEntitySet="Cash">
+          <ScalarProperty Name="IdCash" ColumnName="IdCash" />
+          <ScalarProperty Name="Sum" ColumnName="Sum" />
+          <ScalarProperty Name="PaymentName" ColumnName="PaymentName" />
+          <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="CashRegister">
+      <EntityTypeMapping TypeName="gr606_sosanModel.CashRegister">
+        <MappingFragment StoreEntitySet="CashRegister">
+          <ScalarProperty Name="IdCashRegistre" ColumnName="IdCashRegistre" />
+          <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+          <ScalarProperty Name="IdProduct" ColumnName="IdProduct" />
+          <ScalarProperty Name="IdSurrender" ColumnName="IdSurrender" />
+          <ScalarProperty Name="IdDate" ColumnName="IdDate" />
+          <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Dates">
+      <EntityTypeMapping TypeName="gr606_sosanModel.Dates">
+        <MappingFragment StoreEntitySet="Dates">
+          <ScalarProperty Name="IdDate" ColumnName="IdDate" />
+          <ScalarProperty Name="Date" ColumnName="Date" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Employees">
+      <EntityTypeMapping TypeName="gr606_sosanModel.Employees">
+        <MappingFragment StoreEntitySet="Employees">
+          <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+          <ScalarProperty Name="Surname" ColumnName="Surname" />
+          <ScalarProperty Name="Name" ColumnName="Name" />
+          <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
+          <ScalarProperty Name="TelephoneNumber" ColumnName="TelephoneNumber" />
+          <ScalarProperty Name="Email" ColumnName="Email" />
+          <ScalarProperty Name="Login" ColumnName="Login" />
+          <ScalarProperty Name="Password" ColumnName="Password" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="PasportDetails">
+      <EntityTypeMapping TypeName="gr606_sosanModel.PasportDetails">
+        <MappingFragment StoreEntitySet="PasportDetails">
+          <ScalarProperty Name="IdDetail" ColumnName="IdDetail" />
+          <ScalarProperty Name="Number" ColumnName="Number" />
+          <ScalarProperty Name="Series" ColumnName="Series" />
+          <ScalarProperty Name="IssuedBy" ColumnName="IssuedBy" />
+          <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Payment">
+      <EntityTypeMapping TypeName="gr606_sosanModel.Payment">
+        <MappingFragment StoreEntitySet="Payment">
+          <ScalarProperty Name="IdPay" ColumnName="IdPay" />
+          <ScalarProperty Name="HistoryAboutPayment" ColumnName="HistoryAboutPayment" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Product">
+      <EntityTypeMapping TypeName="gr606_sosanModel.Product">
+        <MappingFragment StoreEntitySet="Product">
+          <ScalarProperty Name="IdProduct" ColumnName="IdProduct" />
+          <ScalarProperty Name="Name" ColumnName="Name" />
+          <ScalarProperty Name="Manufacture" ColumnName="Manufacture" />
+          <ScalarProperty Name="ProductGroup" ColumnName="ProductGroup" />
+          <ScalarProperty Name="Cost" ColumnName="Cost" />
+          <ScalarProperty Name="TypeOfProduct" ColumnName="TypeOfProduct" />
+          <ScalarProperty Name="Bardcode" ColumnName="Bardcode" />
+          <ScalarProperty Name="Margin" ColumnName="Margin" />
+          <ScalarProperty Name="Quantity" ColumnName="Quantity" />
+          <ScalarProperty Name="Discount" ColumnName="Discount" />
+          <ScalarProperty Name="Unit" ColumnName="Unit" />
+          <ScalarProperty Name="VAT" ColumnName="VAT" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Revenue">
+      <EntityTypeMapping TypeName="gr606_sosanModel.Revenue">
+        <MappingFragment StoreEntitySet="Revenue">
+          <ScalarProperty Name="IdRevenue" ColumnName="IdRevenue" />
+          <ScalarProperty Name="SumRevenue" ColumnName="SumRevenue" />
+          <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="SuppliersProduct">
+      <EntityTypeMapping TypeName="gr606_sosanModel.SuppliersProduct">
+        <MappingFragment StoreEntitySet="SuppliersProduct">
+          <ScalarProperty Name="IdSupplier" ColumnName="IdSupplier" />
+          <ScalarProperty Name="CompanyName" ColumnName="CompanyName" />
+          <ScalarProperty Name="IdSupply" ColumnName="IdSupply" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="SupplyProduct">
+      <EntityTypeMapping TypeName="gr606_sosanModel.SupplyProduct">
+        <MappingFragment StoreEntitySet="SupplyProduct">
+          <ScalarProperty Name="IdSupply" ColumnName="IdSupply" />
+          <ScalarProperty Name="QuantityDeliveredProduct" ColumnName="QuantityDeliveredProduct" />
+          <ScalarProperty Name="CostDeliveredProduct" ColumnName="CostDeliveredProduct" />
+          <ScalarProperty Name="IdProduct" ColumnName="IdProduct" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="SurrenderOfMoney">
+      <EntityTypeMapping TypeName="gr606_sosanModel.SurrenderOfMoney">
+        <MappingFragment StoreEntitySet="SurrenderOfMoney">
+          <ScalarProperty Name="IdSurrender" ColumnName="IdSurrender" />
+          <ScalarProperty Name="Sum" ColumnName="Sum" />
+          <ScalarProperty Name="NumberOfChecks" ColumnName="NumberOfChecks" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="WorkingShift">
+      <EntityTypeMapping TypeName="gr606_sosanModel.WorkingShift">
+        <MappingFragment StoreEntitySet="WorkingShift">
+          <ScalarProperty Name="IdShift" ColumnName="IdShift" />
+          <ScalarProperty Name="NameShift" ColumnName="NameShift" />
+          <ScalarProperty Name="IdEmployee" ColumnName="IdEmployee" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+  </EntityContainerMapping>
+</Mapping>

+ 362 - 0
OUP/obj/Debug/edmxResourcesToEmbed/Model1.ssdl

@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Schema Namespace="Хранилище gr606_sosanModel" Provider="System.Data.SqlClient" ProviderManifestToken="2008" 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/02/edm/ssdl">
+  <EntityType Name="Address">
+    <Key>
+      <PropertyRef Name="IdAddress" />
+    </Key>
+    <Property Name="IdAddress" Type="int" Nullable="false" />
+    <Property Name="Street" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="Number" Type="int" Nullable="false" />
+    <Property Name="HouseNumber" Type="int" Nullable="false" />
+    <Property Name="Flat" Type="int" Nullable="false" />
+    <Property Name="IdEmployee" Type="int" />
+  </EntityType>
+  <EntityType Name="CardAmount">
+    <Key>
+      <PropertyRef Name="IdCard" />
+    </Key>
+    <Property Name="IdCard" Type="int" Nullable="false" />
+    <Property Name="Sum" Type="money" />
+    <Property Name="PaymentName" Type="nvarchar" MaxLength="50" />
+    <Property Name="IdPay" Type="int" />
+  </EntityType>
+  <EntityType Name="Cash">
+    <Key>
+      <PropertyRef Name="IdCash" />
+    </Key>
+    <Property Name="IdCash" Type="int" Nullable="false" />
+    <Property Name="Sum" Type="money" />
+    <Property Name="PaymentName" Type="nvarchar" MaxLength="50" />
+    <Property Name="IdPay" Type="int" />
+  </EntityType>
+  <EntityType Name="CashRegister">
+    <Key>
+      <PropertyRef Name="IdCashRegistre" />
+    </Key>
+    <Property Name="IdCashRegistre" Type="int" Nullable="false" />
+    <Property Name="IdEmployee" Type="int" />
+    <Property Name="IdProduct" Type="int" />
+    <Property Name="IdSurrender" Type="int" />
+    <Property Name="IdDate" Type="int" />
+    <Property Name="IdPay" Type="int" />
+  </EntityType>
+  <EntityType Name="Dates">
+    <Key>
+      <PropertyRef Name="IdDate" />
+    </Key>
+    <Property Name="IdDate" Type="int" Nullable="false" />
+    <Property Name="Date" Type="date" />
+  </EntityType>
+  <EntityType Name="Employees">
+    <Key>
+      <PropertyRef Name="IdEmployee" />
+    </Key>
+    <Property Name="IdEmployee" Type="int" Nullable="false" />
+    <Property Name="Surname" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="Patronymic" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="TelephoneNumber" Type="nvarchar" MaxLength="20" Nullable="false" />
+    <Property Name="Email" Type="nvarchar" MaxLength="50" Nullable="false" />
+    <Property Name="Login" Type="nvarchar" MaxLength="20" Nullable="false" />
+    <Property Name="Password" Type="nvarchar" MaxLength="20" Nullable="false" />
+  </EntityType>
+  <EntityType Name="PasportDetails">
+    <Key>
+      <PropertyRef Name="IdDetail" />
+    </Key>
+    <Property Name="IdDetail" Type="int" Nullable="false" />
+    <Property Name="Number" Type="int" Nullable="false" />
+    <Property Name="Series" Type="int" Nullable="false" />
+    <Property Name="IssuedBy" Type="nvarchar" MaxLength="150" Nullable="false" />
+    <Property Name="IdEmployee" Type="int" />
+  </EntityType>
+  <EntityType Name="Payment">
+    <Key>
+      <PropertyRef Name="IdPay" />
+    </Key>
+    <Property Name="IdPay" Type="int" Nullable="false" />
+    <Property Name="HistoryAboutPayment" Type="nvarchar" MaxLength="255" />
+  </EntityType>
+  <EntityType Name="Product">
+    <Key>
+      <PropertyRef Name="IdProduct" />
+    </Key>
+    <Property Name="IdProduct" Type="int" Nullable="false" />
+    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="Manufacture" Type="nvarchar" MaxLength="255" Nullable="false" />
+    <Property Name="ProductGroup" Type="nvarchar" MaxLength="255" Nullable="false" />
+    <Property Name="Cost" Type="money" Nullable="false" />
+    <Property Name="TypeOfProduct" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="Bardcode" Type="int" Nullable="false" />
+    <Property Name="Margin" Type="money" Nullable="false" />
+    <Property Name="Quantity" Type="int" Nullable="false" />
+    <Property Name="Discount" Type="money" Nullable="false" />
+    <Property Name="Unit" Type="nvarchar" MaxLength="50" Nullable="false" />
+    <Property Name="VAT" Type="money" />
+  </EntityType>
+  <EntityType Name="Revenue">
+    <Key>
+      <PropertyRef Name="IdRevenue" />
+    </Key>
+    <Property Name="IdRevenue" Type="int" Nullable="false" />
+    <Property Name="SumRevenue" Type="money" />
+    <Property Name="IdEmployee" Type="int" />
+  </EntityType>
+  <EntityType Name="SuppliersProduct">
+    <Key>
+      <PropertyRef Name="IdSupplier" />
+    </Key>
+    <Property Name="IdSupplier" Type="int" Nullable="false" />
+    <Property Name="CompanyName" Type="nvarchar" MaxLength="255" Nullable="false" />
+    <Property Name="IdSupply" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="SupplyProduct">
+    <Key>
+      <PropertyRef Name="IdSupply" />
+    </Key>
+    <Property Name="IdSupply" Type="int" Nullable="false" />
+    <Property Name="QuantityDeliveredProduct" Type="int" Nullable="false" />
+    <Property Name="CostDeliveredProduct" Type="money" Nullable="false" />
+    <Property Name="IdProduct" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="SurrenderOfMoney">
+    <Key>
+      <PropertyRef Name="IdSurrender" />
+    </Key>
+    <Property Name="IdSurrender" Type="int" Nullable="false" />
+    <Property Name="Sum" Type="money" />
+    <Property Name="NumberOfChecks" Type="int" />
+  </EntityType>
+  <EntityType Name="WorkingShift">
+    <Key>
+      <PropertyRef Name="IdShift" />
+    </Key>
+    <Property Name="IdShift" Type="int" Nullable="false" />
+    <Property Name="NameShift" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="IdEmployee" Type="int" />
+  </EntityType>
+  <Association Name="FK_Address_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="Address" Type="Self.Address" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="Address">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CardAmount_Payment">
+    <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+    <End Role="CardAmount" Type="Self.CardAmount" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Payment">
+        <PropertyRef Name="IdPay" />
+      </Principal>
+      <Dependent Role="CardAmount">
+        <PropertyRef Name="IdPay" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Cash_Payment">
+    <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+    <End Role="Cash" Type="Self.Cash" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Payment">
+        <PropertyRef Name="IdPay" />
+      </Principal>
+      <Dependent Role="Cash">
+        <PropertyRef Name="IdPay" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Dates">
+    <End Role="Dates" Type="Self.Dates" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Dates">
+        <PropertyRef Name="IdDate" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdDate" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Payment">
+    <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Payment">
+        <PropertyRef Name="IdPay" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdPay" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_Product">
+    <End Role="Product" Type="Self.Product" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Product">
+        <PropertyRef Name="IdProduct" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdProduct" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_CashRegister_SurrenderOfMoney">
+    <End Role="SurrenderOfMoney" Type="Self.SurrenderOfMoney" Multiplicity="0..1" />
+    <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="SurrenderOfMoney">
+        <PropertyRef Name="IdSurrender" />
+      </Principal>
+      <Dependent Role="CashRegister">
+        <PropertyRef Name="IdSurrender" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_PasportDetails_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="PasportDetails" Type="Self.PasportDetails" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="PasportDetails">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Revenue_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="Revenue" Type="Self.Revenue" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="Revenue">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_SuppliersProduct_SupplyProduct">
+    <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="1" />
+    <End Role="SuppliersProduct" Type="Self.SuppliersProduct" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="SupplyProduct">
+        <PropertyRef Name="IdSupply" />
+      </Principal>
+      <Dependent Role="SuppliersProduct">
+        <PropertyRef Name="IdSupply" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_SupplyProduct_Product">
+    <End Role="Product" Type="Self.Product" Multiplicity="1" />
+    <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Product">
+        <PropertyRef Name="IdProduct" />
+      </Principal>
+      <Dependent Role="SupplyProduct">
+        <PropertyRef Name="IdProduct" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_WorkingShift_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
+    <End Role="WorkingShift" Type="Self.WorkingShift" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IdEmployee" />
+      </Principal>
+      <Dependent Role="WorkingShift">
+        <PropertyRef Name="IdEmployee" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <EntityContainer Name="Хранилище gr606_sosanModelContainer">
+    <EntitySet Name="Address" EntityType="Self.Address" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="CardAmount" EntityType="Self.CardAmount" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Cash" EntityType="Self.Cash" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="CashRegister" EntityType="Self.CashRegister" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Dates" EntityType="Self.Dates" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Employees" EntityType="Self.Employees" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="PasportDetails" EntityType="Self.PasportDetails" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Payment" EntityType="Self.Payment" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Revenue" EntityType="Self.Revenue" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="SuppliersProduct" EntityType="Self.SuppliersProduct" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="SupplyProduct" EntityType="Self.SupplyProduct" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="SurrenderOfMoney" EntityType="Self.SurrenderOfMoney" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="WorkingShift" EntityType="Self.WorkingShift" Schema="dbo" store:Type="Tables" />
+    <AssociationSet Name="FK_Address_Employees" Association="Self.FK_Address_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="Address" EntitySet="Address" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CardAmount_Payment" Association="Self.FK_CardAmount_Payment">
+      <End Role="Payment" EntitySet="Payment" />
+      <End Role="CardAmount" EntitySet="CardAmount" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Cash_Payment" Association="Self.FK_Cash_Payment">
+      <End Role="Payment" EntitySet="Payment" />
+      <End Role="Cash" EntitySet="Cash" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Dates" Association="Self.FK_CashRegister_Dates">
+      <End Role="Dates" EntitySet="Dates" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Employees" Association="Self.FK_CashRegister_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Payment" Association="Self.FK_CashRegister_Payment">
+      <End Role="Payment" EntitySet="Payment" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_Product" Association="Self.FK_CashRegister_Product">
+      <End Role="Product" EntitySet="Product" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_CashRegister_SurrenderOfMoney" Association="Self.FK_CashRegister_SurrenderOfMoney">
+      <End Role="SurrenderOfMoney" EntitySet="SurrenderOfMoney" />
+      <End Role="CashRegister" EntitySet="CashRegister" />
+    </AssociationSet>
+    <AssociationSet Name="FK_PasportDetails_Employees" Association="Self.FK_PasportDetails_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="PasportDetails" EntitySet="PasportDetails" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Revenue_Employees" Association="Self.FK_Revenue_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="Revenue" EntitySet="Revenue" />
+    </AssociationSet>
+    <AssociationSet Name="FK_SuppliersProduct_SupplyProduct" Association="Self.FK_SuppliersProduct_SupplyProduct">
+      <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+      <End Role="SuppliersProduct" EntitySet="SuppliersProduct" />
+    </AssociationSet>
+    <AssociationSet Name="FK_SupplyProduct_Product" Association="Self.FK_SupplyProduct_Product">
+      <End Role="Product" EntitySet="Product" />
+      <End Role="SupplyProduct" EntitySet="SupplyProduct" />
+    </AssociationSet>
+    <AssociationSet Name="FK_WorkingShift_Employees" Association="Self.FK_WorkingShift_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="WorkingShift" EntitySet="WorkingShift" />
+    </AssociationSet>
+  </EntityContainer>
+</Schema>

+ 42 - 0
OUP/packages.config

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="EntityFramework" version="4.3.0" targetFramework="net472" />
+  <package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.1" targetFramework="net48" />
+  <package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net48" />
+  <package id="Microsoft.Data.SqlClient" version="1.1.3" targetFramework="net48" />
+  <package id="Microsoft.Data.SqlClient.SNI" version="1.1.0" targetFramework="net48" />
+  <package id="Microsoft.EntityFrameworkCore" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.EntityFrameworkCore.Abstractions" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.EntityFrameworkCore.Analyzers" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.EntityFrameworkCore.Relational" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.EntityFrameworkCore.SqlServer" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Caching.Abstractions" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Caching.Memory" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Configuration" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Configuration.Abstractions" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Configuration.Binder" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.DependencyInjection" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Logging" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Logging.Abstractions" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Options" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Extensions.Primitives" version="3.1.25" targetFramework="net48" />
+  <package id="Microsoft.Identity.Client" version="3.0.8" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.JsonWebTokens" version="5.5.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Logging" version="5.5.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Protocols" version="5.5.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.5.0" targetFramework="net48" />
+  <package id="Microsoft.IdentityModel.Tokens" version="5.5.0" targetFramework="net48" />
+  <package id="Newtonsoft.Json" version="10.0.1" targetFramework="net48" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net48" />
+  <package id="System.Collections.Immutable" version="1.7.1" targetFramework="net48" />
+  <package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net48" />
+  <package id="System.Configuration.ConfigurationManager" version="4.4.0" targetFramework="net48" />
+  <package id="System.Data.Common" version="4.3.0" targetFramework="net48" />
+  <package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net48" />
+  <package id="System.IdentityModel.Tokens.Jwt" version="5.5.0" targetFramework="net48" />
+  <package id="System.Memory" version="4.5.4" targetFramework="net48" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net48" />
+  <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
+</packages>

BIN
packages/EntityFramework.4.3.0/.signature.p7s


+ 6 - 0
packages/EntityFramework.4.3.0/Content/App.config.transform

@@ -0,0 +1,6 @@
+<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=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    </configSections>
+</configuration>

+ 0 - 0
packages/EntityFramework.4.3.0/Content/Web.config.transform


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels