private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (DBMethods.IsLoginExist(tbNewLogin.Text))
     {
         MessageBox.Show("This name is already used");
     }
     else
     {
         DBMethods.RegisterNewUser(tbNewLogin.Text, tbNewPassword.Text, (int)cbNewLevel.SelectedValue);
     }
 }
Exemple #2
0
 private void btnRegisterNew_Click(object sender, RoutedEventArgs e)
 {
     if (DBMethods.IsLoginExist(tbLogin.Text))
     {
         MessageBox.Show("This name is already used");
     }
     else
     {
         DBMethods.RegisterNewUser(tbLogin.Text, tbPassword.Text, 1);
         btnLogIn_Click(this, e);
     }
 }