public List <ViewBangThuTienRow> EvaluateViewBangThuTienRowsForReport(List <ViewBangThuTienRow> viewBangThuTienRows, DateTime toDate) { HashSet <int> hocSinhIds = new HashSet <int>(); foreach (ViewBangThuTienRow viewBangThuTienRow in viewBangThuTienRows) { if (!hocSinhIds.Contains(viewBangThuTienRow.HocSinhId)) { hocSinhIds.Add(viewBangThuTienRow.HocSinhId); } } LoggerFacade.Info(string.Format("EvaluateViewBangThuTienRowsForReport for list HocSinhIds=[{0}]", StringUtil.JoinWithCommas(hocSinhIds.ToList()))); HocSinhLopTableAdapter hocSinhLopTableAdapter = (HocSinhLopTableAdapter)StaticDataFacade.Get(StaticDataKeys.AdapterHocSinhLop); Dictionary <int, QLMamNon.Dao.QLMamNonDs.LopRow> hocSinhIdsToLopNames = StaticDataUtil.GetLopsByHocSinhIds(hocSinhIds.ToList(), toDate); HocSinhDataTable hocSinhDataTable = this.getHocSinhData(); foreach (ViewBangThuTienRow viewBangThuTienRow in viewBangThuTienRows) { viewBangThuTienRow.HoTen = StaticDataUtil.GetHocSinhFullNameByHocSinhId(hocSinhDataTable, viewBangThuTienRow.HocSinhId); if (hocSinhIdsToLopNames.ContainsKey(viewBangThuTienRow.HocSinhId)) { viewBangThuTienRow.Lop = hocSinhIdsToLopNames[viewBangThuTienRow.HocSinhId].Name; } } return(viewBangThuTienRows); }