예제 #1
0
        protected void Lblogins_Click(object sender, EventArgs e)
        {
            string passold = fm.MaHoaMatKhau(txtpassOld.Text);
            string passnew = fm.MaHoaMatKhau(txtpassNew.Text);

            if (user.changePass(_iUserID, passold, passnew))
            {
                string strScript = "<script>";
                strScript += "alert(' Cập nhật thành công!');";
                strScript += "window.location='/m-doi-mat-khau.html';";
                strScript += "</script>";
                Page.RegisterClientScriptBlock("strScript", strScript);
            }
            else
            {
                string strScript = "<script>";
                strScript += "alert(' Mật khẩu cũ không đúng!');";
                strScript += "</script>";
                Page.RegisterClientScriptBlock("strScript", strScript);
            }
        }