public ExDateTime[] GetEffectiveDates() { if (this.viewType == CalendarViewType.Monthly) { return(PrintMonthlyView.GetEffectiveDates(this.calendarAdapter, this.sessionContext, this.workingDayOnly)); } return(PrintDailyView.GetEffectiveDates(this.calendarAdapter.DateRanges)); }
public PrintMonthlyView(ISessionContext sessionContext, CalendarAdapterBase calendarAdapter, bool workingDayOnly) : base(sessionContext, calendarAdapter) { this.showWeekNumbers = sessionContext.ShowWeekNumbers; this.calendar = new GregorianCalendar(); this.daysFormat = (DateTimeUtilities.GetDaysFormat(sessionContext.DateFormat) ?? "%d"); this.firstDayFormat = "MMM %d"; if (CalendarUtilities.FullMonthNameRequired(sessionContext.UserCulture)) { this.firstDayFormat = string.Format("MMMM {0}", this.daysFormat); } this.workingDayOnly = workingDayOnly; this.sessionContext = sessionContext; this.workDays = PrintMonthlyView.GetWorkingDays(calendarAdapter, sessionContext); }
public static ExDateTime[] GetEffectiveDates(CalendarAdapterBase calendarAdapter, ISessionContext sessionContext, bool workingDayOnly) { List <ExDateTime> list = new List <ExDateTime>(); bool flag = false; int workingDays = PrintMonthlyView.GetWorkingDays(calendarAdapter, sessionContext); for (int i = 0; i < calendarAdapter.DateRanges.Length; i++) { ExDateTime start = calendarAdapter.DateRanges[i].Start; if (start.Day == 1) { if (flag) { break; } flag = true; } if (flag && PrintMonthlyView.ShouldRenderDay(start, workingDays, workingDayOnly)) { list.Add(start); } } return(list.ToArray()); }
public ExDateTime[] GetEffectiveDates() { return(PrintMonthlyView.GetEffectiveDates(base.CalendarAdapter, this.sessionContext, this.workingDayOnly)); }
private bool ShouldRenderDay(ExDateTime day) { return(PrintMonthlyView.ShouldRenderDay(day, this.workDays, this.workingDayOnly)); }