Procházet zdrojové kódy

при регистрации данные заносятся в бд

aush před 1 rokem
rodič
revize
b4afe0d197

+ 1 - 1
TeaTime/page/Authorization.xaml.cs

@@ -34,7 +34,7 @@ namespace teaTime
             {
                 NavigationService.Navigate(new wWorkerMain(worker));
             }
-            else if (checkMember())
+            else if (checkMember(aLogin.Text, aPass.Password))
             {
                 NavigationService.Navigate(new wMemberMain(member));
             }

+ 13 - 14
TeaTime/page/Regestration.xaml.cs

@@ -104,22 +104,21 @@ namespace teaTime
             //код
             if (check())
             {
-                List<Member> code = DataBaseConnect.DataBase.User.ToList();
-                var lastItem = code.Last();
-                User user = new User()
+                List<Member> List = DataBaseConnect.DataBase.Member.ToList();
+                var lastItem = List.Last();
+                Member newUser = new Member()
                 {
-                    ID_User = lastItem.ID_User + 1,
-                    Surname_User = txtSuName.Text,
-                    Name_User = txtName.Text,
-                    Login_User = txtLogin.Text,
-                    Password_User = txtPass.Password,
-                    Phone_User = txtPhon.Text,
-                    Address = txtAdres.Text,
-                    ID_Role = 2,
+                    surname = aSurname.Text,
+                    name = aName.Text,
+                    middleName = aMiddleName.Text,
+                    phone = aPhoneNum.Text,
+                    email = aEmail.Text,
+                    login = aLogin.Text,
+                    password = aPass.Password
                 };
-                DataBase.BaseModel.User.Add(user);
-                DataBase.BaseModel.SaveChanges();
-                DataBase.BaseModel = new MFSystemEntities();
+                DataBaseConnect.DataBase.Member.Add(newUser);
+                DataBaseConnect.DataBase.SaveChanges();
+                DataBaseConnect.DataBase = new KotkovaISazonovaEntities_();
                 NavigationService.Navigate(new Authorization());
             }
             else