private void btnDangNhap_Click(object sender, EventArgs e) { NguoiDung nguoiDung = _authService.DangNhap(txtTaiKhoan.Text, txtMatKhau.Text); if (nguoiDung != null) { this.Hide(); switch (nguoiDung.Quyen) { case 1: frmAdmin frmAdmin = new frmAdmin(); frmAdmin.ShowDialog(); break; case 2: GiaoVien giaoVien = _authService.LayThongTinGiaoVien(nguoiDung.IDNguoiDung); frmGiaoVien frmGV = new frmGiaoVien(nguoiDung); frmGV.Show(); break; case 3: QuanLyThiTracNghiem.Data.HocSinh hocSinh = _authService.LayThongTinHocSinh(nguoiDung.IDNguoiDung); frmHocSinh frmHocSinh = new frmHocSinh(nguoiDung); frmHocSinh.ShowDialog(); break; default: break; } } lblDangNhapLoi.Visible = true; }
private void btnHS_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmHocSinh frm = new frmHocSinh(); frm.ShowDialog(); }