Exemplo n.º 1
0
 private void btnChangePassword_Click(object sender, EventArgs e)
 {
     if (ValidateInput())
     {
         try
         {
             SystemUser selectedUser = (SystemUser)cmbUserName.SelectedItem;
             selectedUser.UserNewPassword = txtNewPassword.Text;
             selectedUser.ChangePassword();
             this.DialogResult = DialogResult.OK;
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }