Example #1
0
 private void btnDongY_Click_1(object sender, EventArgs e)
 {
     if (IsEmpty())
     {
         this.labelform.Text      = "";
         this.labelthanhcong.Text = "(*) Thông tin bắt buộc không được để trống";
     }
     else
     {
         a = txtuser.Text;
         b = txtmatkhaucudmk.Text;
         c = txtmatkhaumoidmk.Text;
         d = txtnhaplaimatkhaudmk.Text;
         if (txtmatkhaumoidmk.Text == txtnhaplaimatkhaudmk.Text)
         {
             if (txtmatkhaucudmk.Text != txtmatkhaumoidmk.Text)
             {
                 if ((TKBUS.ThayDoiMatKhau(a, b, c, d) == 1))
                 {
                     this.labelform.Text      = "";
                     this.labelthanhcong.Text = "Bạn đã thay đổi mật khẩu thành công";
                     this.labeltrung.Text     = "";
                 }
                 else
                 {
                     this.labeltrung.Text     = "";
                     this.labelform.Text      = "";
                     this.labelthanhcong.Text = "(*) Mật khẩu cũ không chính xác";
                 }
             }
             else
             {
                 this.labelform.Text      = "";
                 this.labeltrung.Text     = "(*) Mật khẩu mới không được trùng với mật khẩu cũ";
                 this.labelthanhcong.Text = "";
             }
         }
         else
         {
             this.labelform.Text      = "";
             this.labelthanhcong.Text = "(*) Nhập lại mật khẩu không chính xác";
             this.labeltrung.Text     = "";
         }
     }
 }