Пример #1
0
        private void btnThaydoi_Click(object sender, EventArgs e)
        {
            if (XL2.KiemtraKetnoiCSDL() == false)
            {
                return;
            }

            string oldPass     = btnEditMatkhauCu.Text;
            string newPass     = btnEditMatkhauMoi1.Text;
            string testPass    = btnEditMatkhauMoi2.Text;
            string userAccount = GlobalVariables.CurrentUserAccount;
            int    userID      = GlobalVariables.CurrentUserID;

            if (newPass == testPass)
            {
                ACMessageBox.Show("Vui lòng nhập 2 mật khẩu mới giống nhau.", Resources.Caption_Loi, 2000);
                return;
            }
            if (DAO5.ChangePassword(oldPass, newPass, userAccount, userID))
            {
                ACMessageBox.Show(Resources.Text_DaThucHienXong, Resources.Caption_ThongBao, 2000);
                this.Close();
            }
        }