Beispiel #1
0
        private static List <DateCellViewModel> GetCurrentWeekData()
        {
            List <DateCellViewModel> weekDaysViewList = new List <DateCellViewModel>();

            for (int i = -3; i < 7; i++)
            {
                DateCellViewModel dateCell = new DateCellViewModel();
                dateCell.DateValue      = DateTime.Now.AddDays(i);
                dateCell.IsSelectedCell = i == 0 ? true : false;
                dateCell.DateCellIndex  = i + -3 * -1;

                weekDaysViewList.Add(dateCell);
            }

            return(weekDaysViewList);
        }
        public async Task <List <DateCellViewModel> > GetCurrentWeekData()
        {
            List <DateCellViewModel> weekDaysViewList = new List <DateCellViewModel>();

            for (int i = loopStartValue; i < loopEndValue; i++)
            {
                DateCellViewModel dateCell = new DateCellViewModel();
                dateCell.DateValue      = _dateTimeProvider.Now.AddDays(i);
                dateCell.IsSelectedCell = i == 0 ? true : false;
                dateCell.DateCellIndex  = i + loopStartValue * -1;

                weekDaysViewList.Add(dateCell);
            }

            return(await Task.FromResult(weekDaysViewList));
        }