protected DateRange GetChartCurrentRange(bool monthRange = false) { DateTime selectedDate = monthRange ? UnitSalesVerticalChart.GetSelectedDate() : DailySalesPerformanceVerticalChart.GetSelectedDate(); return(GetRange(selectedDate, monthRange ? SelectionInterval.Month : SelectionInterval.Day)); }
protected DateRange GetChartPreviousRange(bool monthRange = false) { DateTime dayBeforeSelected = monthRange ? UnitSalesVerticalChart.GetSelectedDate().AddMonths(-1) : DailySalesPerformanceVerticalChart.GetSelectedDate().AddDays(-1); return(GetRange(dayBeforeSelected, monthRange ? SelectionInterval.Month : SelectionInterval.Day)); }