private void dgvListLop_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         txtMaLop.Text      = dgvListLop.Rows[e.RowIndex].Cells["MaLop"].Value.ToString();
         txtTenLop.Text     = dgvListLop.Rows[e.RowIndex].Cells["TenLop"].Value.ToString();
         txtSiSoLop.Text    = dgvListLop.Rows[e.RowIndex].Cells["SiSo"].Value.ToString();
         txtTreThamGia.Text = HoatDongNgoaiKhoaBLL.GetListTreThamGiaHoatDong(maHD, txtMaLop.Text).Length.ToString();
     }
 }
 private void dgvListTre_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
 {
     string[] treThamGia = HoatDongNgoaiKhoaBLL.GetListTreThamGiaHoatDong(maHD, maLop);
     listTre.Clear();
     if (treThamGia != null)
     {
         for (int i = 0; i < dgvListTre.RowCount; i++)
         {
             DataGridViewCheckBoxCell chkBoxCell = (DataGridViewCheckBoxCell)dgvListTre.Rows[i].Cells["CheckBox"];
             if (CheckTreThamGia(dgvListTre.Rows[i].Cells["MaTre"].Value.ToString(), treThamGia))
             {
                 chkBoxCell.Value = "true";
                 listTre.Add(dgvListTre.Rows[i].Cells["MaTre"].Value.ToString(), true);
             }
             else
             {
                 chkBoxCell.Value = "false";
                 listTre.Add(dgvListTre.Rows[i].Cells["MaTre"].Value.ToString(), false);
             }
         }
     }
 }