Ejemplo n.º 1
0
        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!";
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 private void OnBackClick(object sender, RoutedEventArgs e)
 {
     if (register)
     {
         LogInPage LogIn = new LogInPage();
         LogIn.Show();
         Close();
     }
     else
     {
         UsersManagementPage UserManagement = new UsersManagementPage();
         UserManagement.Show();
         Close();
     }
 }