private void OnRegisterClick(object sender, RoutedEventArgs e) { bool isLibrarian = (SerialNumTB.Text == serialNum); if (SDM.LMS.RegisterUser ( LoginTB.Text, PasswordTB.Password, NameTB.Text, AdressTB.Text, PhoneNumberTB.Text, isLibrarian )) { if (register) { LogInPage LogIn = new LogInPage(); LogIn.Show(); Close(); } else { UsersManagementPage UserManagement = new UsersManagementPage(); UserManagement.Show(); Close(); } } else { InfoText.Content = "User with such login already exist!"; } }
private void RegisterUser() { bool isLibrarian = (SerialNumTB.Text == SDM.Strings.SERIAL_NUMBER); if (SDM.LMS.RegisterUser ( LoginTB.Text, PasswordTB.Password, NameTB.Text, AdressTB.Text, PhoneNumberTB.Text, isLibrarian )) { if (_register) { LogInPage LogIn = new LogInPage(); LogIn.Show(); Close(); } else { Close(); } } else { MessageBox.Show(SDM.Strings.USER_EXIST_TEXT); } }
private void OnBackClick(object sender, RoutedEventArgs e) { if (register) { LogInPage LogIn = new LogInPage(); LogIn.Show(); Close(); } else { UsersManagementPage UserManagement = new UsersManagementPage(); UserManagement.Show(); Close(); } }