protected void LoadItems()
        {
            LogManager.GetLog(GetType()).Info("Load items");
            CalculateCalendarRegion();

            var days = new List<ChildDayUI>();

            var date = _startDate;
            while (date <= _endDate)
            {
                var scheduled = _child.Schedule.Where(d => d.Day == date).FirstOrDefault();
                var day = new ChildDayUI
                {
                    Day = date,
                    ActiveMonth = date.Month == _currentDate.Month,
                    Active = (date.DayOfWeek != DayOfWeek.Saturday) &&
                                     (date.DayOfWeek != DayOfWeek.Sunday)
                };

                if (scheduled != null)
                {
                    day.Morning = scheduled.Morning;
                    day.Afternoon = scheduled.Afternoon;
                }

                days.Add(day);
                date = date.AddDays(1);
            }

            Days = days;

            BuildWeeks();
        }
 public void ToggleAfternoonAction(ChildDayUI ui)
 {
     ui.Afternoon = !ui.Afternoon;
     UpdateWeek(ui.Day);
 }
 public void ToggleMorningAction(ChildDayUI ui)
 {
     ui.Morning = !ui.Morning;
     UpdateWeek(ui.Day);
 }
 public void ToggleAction(ChildDayUI ui)
 {
     ui.Morning = !ui.Morning;
     ui.Afternoon = ui.Morning;
     UpdateWeek(ui.Day);
 }