private void btnDoiPass_Click(object sender, EventArgs e) { if (txtMatKhauCu.Text != frmDangNhap.MatKhau) { lbMatKhauCu.Text = "Mật Khẩu Không Đúng"; } else { nd.TaiKhoan = frmDangNhap.TaiKhoan; nd.MatKhau = txtMatKhauMoi.Text; if (txtMatKhauMoi.Text == "") { lbMatKhauMoi.Text = "Bạn chưa nhập mật khẩu"; } else if (txtMatKhauMoi.Text != txtNhapLaiMatKhau.Text) { lbMatKhau.Text = "Mật khẩu không trùng khớp"; } else { Bus.SuaTaiKhoan(nd); MessageBox.Show("Đổi Mật Khẩu Thành Công!"); frmMain frmTK = new frmMain(); frmTK.Show(); this.Close(); } } }