private void btDN_Click_1(object sender, EventArgs e) { string tenDN = txbTenDangNhap.Text; string matKhau = txbMatKhau.Text; if (DangNhap(tenDN, matKhau)) { TaiKhoanDTO acc = TaiKhoanDAO.Instance.layTaiKhoan(tenDN); if (acc.LoaiTaiKhoan == "Nhân viên") { fQLBH1 form = new fQLBH1(acc); this.Hide(); form.ShowDialog(); this.Show(); } else { fDieuHuong f = new fDieuHuong(acc); this.Hide(); f.ShowDialog(); this.Show(); } } else { MessageBox.Show("Sai tên tài khoản hoặc mật khẩu !!!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btQLBH_Click_1(object sender, EventArgs e) { fQLBH1 f = new fQLBH1(this.TaiKhoanHienTai); this.Hide(); f.ShowDialog(); this.Show(); }