コード例 #1
0
        private void btXacNhan_Click(object sender, EventArgs e)
        {
            NguoiDungBLL      nguoidungbll  = new NguoiDungBLL();
            string            username      = tbTenDangNhap.Text.Trim();
            string            pass          = tbMatKhauCu.Text.Trim();
            string            passnew       = tbMatKhauMoi.Text.Trim();
            string            xacnhanpass   = bXacNhanMK.Text.Trim();
            NguoiDungEntities nguoidungenti = new NguoiDungEntities();

            nguoidungenti.Username = tbTenDangNhap.Text.Trim();
            nguoidungenti.Pass     = tbMatKhauCu.Text.Trim();
            nguoidungenti.Pass     = tbMatKhauMoi.Text.Trim();
            nguoidungenti.Pass     = bXacNhanMK.Text.Trim();
            if (nguoidungbll.DangNhap(username, pass))
            {
                nguoidungbll.update(nguoidungenti);
                MessageBox.Show("thay doi thanh cong", "thong bao", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                MessageBox.Show("thay doi that bai", "thong bao", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }