2 İşlemeler 7d6ec8669e ... c307ebf5a6

Yazar SHA1 Mesaj Tarih
  AngelikaSuhareva c307ebf5a6 Merge branch 'Nadia' of http://gogs.ngknn.ru:3000/Acosta/Frontend into Nadia 4 ay önce
  AngelikaSuhareva f58044529c Success 4 ay önce

+ 4 - 4
ViewModels/AddEmployeesViewModel.cs

@@ -9,7 +9,7 @@ namespace Acosta.ViewModels
 {
 	public class AddEmployeesViewModel : ReactiveObject
 	{
-        SuharevaContext myConnection;
+        SuharevaContext myConnection1;
         Employee currentUser;
 
         private UserControl uce = new AddTradeNetworksView();
@@ -24,7 +24,7 @@ namespace Acosta.ViewModels
 
         public AddEmployeesViewModel(SuharevaContext myConnection)
         {
-            this.myConnection = myConnection;
+            this.myConnection1 = myConnection;
             CurrentUser = new Employee();
 /*            CurrentUser.Surname = F;
             CurrentUser.Name = I;
@@ -37,7 +37,7 @@ namespace Acosta.ViewModels
         }
         public AddEmployeesViewModel(SuharevaContext myConnection, int userID)
         {
-            this.myConnection = myConnection;
+            this.myConnection1 = myConnection;
             CurrentUser = new Employee();
             myConnection.Add(currentUser);
         }
@@ -55,7 +55,7 @@ namespace Acosta.ViewModels
         public void SaveUser()
         {
             
-            myConnection.SaveChanges();
+            myConnection1.SaveChanges();
             UCE = new EmployeesView();
         }
     }

+ 2 - 1
ViewModels/MainWindowViewModel.cs

@@ -12,6 +12,7 @@ namespace Acosta.ViewModels
     public class MainWindowViewModel : ViewModelBase
     {
         public static SuharevaContext myConnection = new SuharevaContext();
+        public static SuharevaContext myConnection1 = new SuharevaContext();
 
         AuthorizationViewModel authorizationVM = new AuthorizationViewModel();
         public AuthorizationViewModel AuthorizationVM { get => authorizationVM; set => authorizationVM = value; }
@@ -19,7 +20,7 @@ namespace Acosta.ViewModels
         AddTradeNetworksViewViewModel addTradeNetworksVM = new AddTradeNetworksViewViewModel(myConnection);
         public AddTradeNetworksViewViewModel AddTradeNetworksVM { get => addTradeNetworksVM; set => addTradeNetworksVM = value; }
 
-        AddEmployeesViewModel addEmployeesVM = new AddEmployeesViewModel(myConnection);
+        AddEmployeesViewModel addEmployeesVM = new AddEmployeesViewModel(myConnection1);
         public AddEmployeesViewModel AddEmployeesVM { get => addEmployeesVM; set => addEmployeesVM = value; }