コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (txtMatKhauCu.Text != MK)
     {
         MessageBox.Show("Sai mật khẩu", "Thông báo");
         LoadLaiForm();
         return;
     }
     else if (txtMatKhauMoi.Text != txtXacNhan.Text)
     {
         MessageBox.Show("Mật khẩu không khớp", "Thông báo");
         LoadLaiForm();
         return;
     }
     if (UserBUS.DoiMK(TaiKhoan, txtMatKhauMoi.Text) != 0)
     {
         MessageBox.Show("Đổi mật khẩu thành công", "Thông báo");
         MK = txtMatKhauMoi.Text;
     }
     else
     {
         MessageBox.Show("Đổi mật khẩu thất bại");
     }
     LoadLaiForm();
 }