private void btnDangNhap_Click(object sender, EventArgs e) { _NVBLL = new NhanVienBLL(); string mk = txtMatkhau.Text.ToUpper().Trim()+txtTaikhoan.Text.ToUpper().Trim(); string strPassWord = _NVBLL.MaHoaSHA1(mk); //MessageBox.Show(strPassWord.ToString()+"); bool kt; kt=_NVBLL.KiemTraUserName(txtTaikhoan.Text.Trim(),strPassWord); if (kt == true) { string strLoaiNV; strLoaiNV= _NVBLL.KiemTraAdmin(txtTaikhoan.Text.Trim(), strPassWord); if (strLoaiNV.Equals("Admin")) { this.Hide(); frmQuanly frmql = new frmQuanly(); frmql.Show(); } else { _TaiKhoan = txtTaikhoan.Text.Trim(); this.Hide(); frmBanHang frmbh = new frmBanHang(_TaiKhoan); frmbh.Show(); } } else { MessageBox.Show("Tài khoản hoặc mật khẩu không đúng!"); } }
void addFormBanHang() { frmBanHang frm = new frmBanHang(); frm.TopLevel = false; tabBanHang.Controls.Add(frm); frm.Show(); }
private void frmMain1_Load(object sender, EventArgs e) { frmBanHang frmBanHang = new frmBanHang(); frmBanHang.TopLevel = false; panelMain.Controls.Clear(); panelMain.Controls.Add(frmBanHang); frmBanHang.Show(); }
private void banHangToolStripMenuItem_Click(object sender, EventArgs e) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } frmBanHang banhang = new frmBanHang(); banhang.MdiParent = this; banhang.Dock = DockStyle.Fill; banhang.Show(); }
private void btnBanHang_Click(object sender, EventArgs e) { Button btn = sender as Button; changecolorButtonMenu(btn); frmBanHang frmBanHang = new frmBanHang(); frmBanHang.TopLevel = false; panelMain.Controls.Clear(); panelMain.Controls.Add(frmBanHang); frmBanHang.Show(); }
private void btnBanHang_ItemClick(object sender, ItemClickEventArgs e) { Form frm = KiemTraTonTai(typeof(frmBanHang)); if (frm != null) { frm.Activate(); } else { frmBanHang f = new frmBanHang(); f.MdiParent = this; f.Show(); } }
private void itemBanHang_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Form frm = KiemTraTonTai(typeof(frmBanHang)); if (frm != null) { frm.Activate(); } else { frmBanHang f = new frmBanHang(); f.MdiParent = this; f.Show(); } }