Пример #1
0
 // Settings Tab
 private async void UiNewPasswordButton_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(uiNewPassExistingTextBox.Text) || string.IsNullOrEmpty(uiNewPassTextBox.Text) || string.IsNullOrEmpty(uiNewPassConfirmTextBox.Text))
     {
         if (await teacherController.ChangePassword(uiNewPassExistingTextBox.Text, uiNewPassTextBox.Text, uiNewPassConfirmTextBox.Text))
         {
             uiNewPassExistingTextBox.Clear();
             uiNewPassTextBox.Clear();
             uiNewPassConfirmTextBox.Clear();
             MessageBox.Show("Password Change successful!");
         }
         else
         {
             MessageBox.Show("Please check the new password and the confirm password match");
         }
     }
     else
     {
         MessageBox.Show("Please fill all required fields");
     }
 }