private void btnXoa_Click(object sender, EventArgs e) { DataRow dr; for (int i = 0; i < dtDanhSach.Rows.Count; i++) { dr = dtDanhSach.Rows[i]; if (bool.Parse(dr["Chon"].ToString())) { if (int.Parse("" + dr["KQHT_DanhSachDuThiID"]) > 0) { oBKQHT_DanhSachDuThi.ToInfo(ref pKQHT_DanhSachDuThiInfo, dr); oBKQHT_DanhSachDuThi.Delete(pKQHT_DanhSachDuThiInfo); dtDanhSach.Rows.Remove(dr); } else { dtDanhSach.Rows.Remove(dr); } i--; } } }