Esempio n. 1
0
 private void StuPwd()
 {
     if (!ValidateInfo())
     {
         return;
     }
     if (Convert.ToInt32(LoginManager.CheckStuPwd(student, textBox1.Text)) > 0)
     {
         if (LoginManager.UpdateStuPwd(student, textBox3.Text))
         {
             MessageBox.Show(
                 "成功修改密码!",
                 "成功",
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Information);
             NeedConfirmOnExit = false;
             Close();
         }
         else
         {
             MessageBox.Show("修改失败,请重试!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show("旧密码输入错误,请重新输入!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }