private DataTable loadDataToGrid() { boCapcc = new BO_CAP_CHUNGCHI(); mtbl = new DataTable(); if (vCheckLopDaCapCC()) { mtbl = boCapcc.vCheckLopDaCapCcByLopMonID(sLopID, sMonID, sLanThi); gridEntryCoures.DataSource = mtbl; ArrayList aDiem = new ArrayList(); for (int i = 0; i < mtbl.Rows.Count; i++) { aDiem.Add(mtbl.Rows[i]["DIE_Diem"]); mAraayDiem.Add(aDiem); } } else { mtbl = boDiem.select_Diem_by_Lop_Mon(sLopID, sMonID, sLanThi); gridEntryCoures.DataSource = mtbl; ArrayList aDiem = new ArrayList(); for (int i = 0; i < mtbl.Rows.Count; i++) { aDiem.Add(mtbl.Rows[i]["DIE_Diem"]); mAraayDiem.Add(aDiem); } } return(mtbl); }
private bool vCheckLopDaCapCC() { sLopID = int.Parse(lookUpLop.GetColumnValue("LOP_ID").ToString()); sMonID = int.Parse(lookMonHoc.GetColumnValue("MON_ID").ToString()); sLanThi = int.Parse(lookLanThi.GetColumnValue("DIE_LanThi").ToString()); DataTable vtbl = boCapcc.vCheckLopDaCapCcByLopMonID(sLopID, sMonID, sLanThi); if (vtbl.Rows.Count > 0) { return(true); } else { return(false); } }