/// <summary> /// Формирование списка строк отчета за день по конкретному сотруднику. /// </summary> private void DailyReport(List <string> listHoursWorked) { ReportLine reportLine = new ReportLine(); foreach (var str in listHoursWorked) { if (startDate == reportLine.GetDateFromString(str)) { totalHoursWorked += reportLine.GetHoursWorkedFromString(str); _listReport.Add(CreateReportLine(str)); } } }
/// <summary> /// Установить строки за период в переменную _listReport. /// </summary> private void SetLinesForPeriod(List <string> listHoursWorked) { // Считываемая дата. DateTime readDate; ReportLine reportLine = new ReportLine(); foreach (var line in listHoursWorked) { readDate = reportLine.GetDateFromString(line); if (readDate >= startDate && readDate <= endDate) { totalHoursWorked += reportLine.GetHoursWorkedFromString(line); _listReport.Add(CreateReportLine(line)); } } }