private void threadSelect_DoWork(object sender, DoWorkEventArgs e) { DateTime date = (e.Argument as DateTime?).Value; List <LinePerformanceDetailModel> linePerformanceDetailList = LinePerformanceDetailController.SelectBySection(section.SectionId, date); e.Result = linePerformanceDetailList; }
void threadShow_DoWork(object sender, DoWorkEventArgs e) { List <PersonalModel> personalList_D1 = personalList.Where(p => p.Department == line).OrderBy(p => p.WorkerId).ToList(); List <SourceModel> sourceList = SourceController.Select(line, year, month); List <WorkerLeaveModel> workerLeaveList = WorkerLeaveController.Select(year, month); performanceDetailList = LinePerformanceDetailController.SelectByPersonal(line, year, month); List <HolidayModel> holidayList = HolidayController.Select(year, month); object[] results = { personalList_D1, sourceList, workerLeaveList, performanceDetailList, holidayList }; e.Result = results; }
private void bwViewReport_DoWork(object sender, DoWorkEventArgs e) { linePerformanceDetailList = LinePerformanceDetailController.SelectBySection(section.SectionId, monthSearch, yearSearch); lineModelList = LineController.Select(section.SectionId); if (selectArea == "Old") { linePerformanceDetailList = linePerformanceDetailList.Where(w => oldArr.Contains(w.LineId) == true).ToList(); lineModelList = lineModelList.Where(w => oldArr.Contains(w.LineId) == true).OrderBy(o => o.Ordinal).ToList(); } if (selectArea == "New") { linePerformanceDetailList = linePerformanceDetailList.Where(w => newArr.Contains(w.LineId) == true).ToList(); lineModelList = lineModelList.Where(w => newArr.Contains(w.LineId) == true).OrderBy(o => o.Ordinal).ToList(); } incentiveGradeList = IncentiveGradeModel.Select().Where(w => w.SectionId == section.SectionId).ToList(); positionList = linePerformanceDetailList.Select(s => s.IncentiveGrade).Distinct().ToList(); }
private void threadOtherDate_DoWork(object sender, DoWorkEventArgs e) { List <Object> arguments = e.Argument as List <Object>; string cardId = arguments[0] as String; DateTime? date = arguments[1] as DateTime?; PersonalModel personal = personalList.Where(p => p.CardId == cardId || p.WorkerId == cardId).FirstOrDefault(); //WorkerLoginModel workerLogin = WorkerLoginController.SelectTop1(cardId, date.Value); LinePerformanceDetailModel linePerformanceDetail = LinePerformanceDetailController.SelectTop1(cardId, date.Value); List <Object> results = new List <Object>(); results.Add(personal); //results.Add(workerLogin); results.Add(linePerformanceDetail); e.Result = results; }
private void bwPrint_DoWork(object sender, DoWorkEventArgs e) { workerLoginList = WorkerLoginController.SelectByLine(section.SectionId, date); linePerformanceDetailList = LinePerformanceDetailController.SelectBySection(section.SectionId, date); }
private void bwPrint_DoWork(object sender, DoWorkEventArgs e) { linePerformanceDetailList = LinePerformanceDetailController.SelectBySection(section.SectionId, date.Month, date.Year); }