コード例 #1
0
 private void btnApDungTatCa_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < dgvListLop.Rows.Count; i++)
     {
         listLop[dgvListLop.Rows[i].Cells["MaLop"].Value.ToString()] = true;
     }
     if (HoatDongNgoaiKhoaBLL.CapNhatLopThamGia(listLop, maHD))
     {
         MessageBox.Show("Cập nhật lớp tham gia thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
         LoadDataGridView();
     }
 }
コード例 #2
0
 private void btnLuu_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < dgvListLop.Rows.Count; i++)
     {
         string maLop = dgvListLop.Rows[i].Cells["MaLop"].Value.ToString();
         if (dgvListLop.Rows[i].Cells["CheckBox"].Value.ToString() == "true" || dgvListLop.Rows[i].Cells["CheckBox"].Value.ToString() == "True")
         {
             listLop[maLop] = true;
         }
         else
         {
             listLop[maLop] = false;
         }
     }
     if (HoatDongNgoaiKhoaBLL.CapNhatLopThamGia(listLop, maHD))
     {
         MessageBox.Show("Cập nhật lớp tham gia thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }