public ReportWeek(int weekNumber) { Number = weekNumber; SegmentationDuration = 0; SegmentationCount = 0; AppCalendar AppCalendar = new AppCalendar(); FirstDay = AppCalendar.GetFirstDayOfWeek(weekNumber); LastDay = AppCalendar.GetLastDayOfWeek(weekNumber); }
public AppReportPeriod(string type = "", int number = 1, int year = 0) { if (type == "") Type = DEFAULT_TYPE; if (year == 0) Year = DateTimeFormatInfo.CurrentInfo.Calendar.GetYear(DateTime.Now); Number = number; SegmentationDuration = 0; SegmentationCount = 0; AppCalendar AppCalendar = new AppCalendar(); switch(type) { case DEFAULT_TYPE: FirstDay = AppCalendar.GetFirstDayOfWeek(number); LastDay = AppCalendar.GetLastDayOfWeek(number); break; } }