コード例 #1
0
 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);
     }
 }
コード例 #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);
     }
 }