Ejemplo n.º 1
0
        private void btn_DangNhap_Click(object sender, EventArgs e)
        {
            if (!m_DangNhapBLL.KiemTraTonTai(txt_TaiKhoan.Text))
            {
                MessageBox.Show("Tài khoản hoặc mật khẩu không đúng !", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            MessageBox.Show("Đăng nhập thành công !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Ejemplo n.º 2
0
 private void btnTaoTaiKhoan_Click(object sender, EventArgs e)
 {
     if (m_NguoiDungBLL.KiemTraTonTai(txtTaiKhoan.Text))
     {
         Notification.Error("Tài khoản đã tồn tại !");
     }
     else
     {
         if (txtMatKhau.Text != txtNhapLaiMatKhau.Text)
         {
             Notification.Error("Mật khẩu không trùng khớp");
         }
         else
         {
             NGUOI_DUNG entity = new NGUOI_DUNG();
             entity.Ten_Nguoi_Dung = txtTaiKhoan.Text;
             entity.Mat_Khau       = txtMatKhau.Text;
             entity.ID_Nguoi_Dung  = m_NguoiDungBLL.LayIDQuyen(cbb_loaiND.Text);
             m_NguoiDungBLL.Them(entity);
             Notification.Success("Tạo tài khoản thành công");
         }
     }
 }