private string GetDisplayWeek(DateTime currentWeekStartdate) { var currentWeekEndDate = currentWeekStartdate.AddDays(6); return currentWeekStartdate.Day + " " + currentWeekStartdate.ToMonthName() + " - " + currentWeekEndDate.Day + " " + currentWeekEndDate.ToMonthName() + " " + currentWeekEndDate.Year; }
private StatsViewModel.Chart.ChartRow BuildChartRow(IReadOnlyCollection<Report> reportsForQuartal, DateTime dateTime) { var monthQuery = reportsForQuartal.Where(report => report.DateHappened.Month == dateTime.Month); var reports = monthQuery as Report[] ?? monthQuery.ToArray(); var monthQueryCompleted = reports.Count(report => report.Status == ReportStatus.Completed); var monthQuerySummary = reports.Count(); return new StatsViewModel.Chart.ChartRow { Month = dateTime.ToMonthName(), ReportsCount = monthQuerySummary, CompletedReportsCount = monthQueryCompleted }; }