private void btnThi_Click(object sender, EventArgs e) { string maDe = cbbChonDeThi.SelectedValue.ToString(); int maKhoi = hocSinhBUS.LayMaKhoiTheoMaDe(maDe); CauHoiHocSinhForm chHocSinh = new CauHoiHocSinhForm(hocSinhLogin, maDe, maKhoi, "ThiThu"); this.Hide(); chHocSinh.ShowDialog(); this.Close(); Application.Exit(); }
private void btnThi_Click(object sender, EventArgs e) { List <DeVaCauHoiThiDTO> dsCauHoiThi = new List <DeVaCauHoiThiDTO>(); dsCauHoiThi = hocSinhBUS.FindDeVaCauHoiTrongKyThi(hocSinhLogin.MaHocSinh); if (dsCauHoiThi == null) { MessageBox.Show("Không có kỳ thi nào cho bạn ngày hôm nay!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { CauHoiHocSinhForm chHocSinh = new CauHoiHocSinhForm(hocSinhLogin, "", 0, "Thi"); this.Hide(); chHocSinh.ShowDialog(); this.Close(); Application.Exit(); } }