示例#1
0
 public void LoadData()
 {
     if (cbbKyThi.Text != "")
     {
         lblTenLop.Text = "Lớp : " + _objlopbus.GetTen_TheoMa_LopHoc(_objkythibus.GetLop_TheoMaKyThi(cbbKyThi.SelectedValue.ToString()));
         _dtketquathi   = _objdanhsachthibus.GetAllDanhSachThi_TheoKyThi(cbbKyThi.SelectedValue.ToString());
         dgvKetQuaThi.RowHeadersVisible = true;
         dgvKetQuaThi.DataSource        = _dtketquathi;
         if (dgvDSHocVienThamGia.DataSource != null)
         {
             _dtketquathi.Columns.Add("STT");
             for (int i = 0; i < _dtketquathi.Rows.Count; i++)
             {
                 _dtketquathi.Rows[i]["STT"] = i + 1;
             }
             dgvKetQuaThi.Columns["STT"].DisplayIndex = 0;
             dgvKetQuaThi.Columns["MaHV"].HeaderText  = "Mã Học Viên";
             //dgvKetQuaThi.Columns["MaHV"].Width = 140;
             dgvKetQuaThi.Columns["HoTen"].HeaderText = "Tên Học Viên";
             //dgvKetQuaThi.Columns["HoTen"].Width = 140;
             dgvKetQuaThi.Columns["KetQuaThi"].HeaderText = "Kết quả thi";
             dgvKetQuaThi.ClearSelection();
         }
     }
     else
     {
         lblTenLop.Text = "";
     }
 }
示例#2
0
 private void dgvDSKyThi_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     txtTenKyThi.Text  = dgvDSKyThi.CurrentRow.Cells[1].Value.ToString();
     cbbLoaiDeThi.Text = _objloaidethibus.GetTen_TheoMa_LoaiDeThi(dgvDSKyThi.CurrentRow.Cells[2].Value.ToString());
     cbbDeThi.Text     = _objdethibus.GetTen_TheoMa_DeThi(dgvDSKyThi.CurrentRow.Cells[3].Value.ToString());
     cbbLop.Text       = _objlopbus.GetTen_TheoMa_LopHoc(dgvDSKyThi.CurrentRow.Cells[4].Value.ToString());
     dtNgayThi.Text    = dgvDSKyThi.CurrentRow.Cells[5].Value.ToString();
     dtGioThi.Text     = dgvDSKyThi.CurrentRow.Cells[6].Value.ToString();
     cbbPhongThi.Text  = _objphonghocbus.GetTen_TheoMa_PhongHoc(dgvDSKyThi.CurrentRow.Cells[7].Value.ToString());
 }