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;
        }
        public LamTracNgiemHS(KyThi kyThi, DeThi deThi, QuanLyThiTracNghiem.Data.HocSinh hs)
        {
            InitializeComponent();
            this._kythi  = kyThi;
            this.deThi   = deThi;
            this.hocsinh = hs;

            time = int.Parse(deThi.ThoiGian.ToString()) * 60;
            LoadThongTin();
            LoadCheckList();
            checklist.SelectedIndexChanged += Checklist_SelectedIndexChanged;
            checkBox1.CheckedChanged       += CheckBox1_CheckedChanged;
            checkBox2.CheckedChanged       += CheckBox1_CheckedChanged;
            checkBox3.CheckedChanged       += CheckBox1_CheckedChanged;
            checkBox4.CheckedChanged       += CheckBox1_CheckedChanged;
            checkBox5.CheckedChanged       += CheckBox1_CheckedChanged;
            checkBox6.CheckedChanged       += CheckBox1_CheckedChanged;
            Runtimecount();
        }
        public LuaChonKiThi(QuanLyThiTracNghiem.Data.HocSinh hocSinh)
        {
            InitializeComponent();
            hocsinh = hocSinh;

            List <KT_H> kT_Hs = _kT_HSRepository.FindByCondition(p => p.MaHS.Equals(hocSinh.MaHS)).ToList();

            List <KyThi> kyThis = new List <KyThi>();

            foreach (var item in kT_Hs)
            {
                kyThis.Add(_kyThiRepos.FindByCondition(p => p.MaKT.Equals(item.MaKT)).Single());
            }

            cbKyThi.DataSource    = kyThis;
            cbKyThi.DisplayMember = "TenKT";
            cbKyThi.ValueMember   = "MaKT";

            cbDeThi.DropDown += CbDeThi_DropDown;
        }