예제 #1
0
        public void AddDay(TrainingCalendarDay day)
        {
            if ((day.Date < FirstDate) || (day.Date > LastDate))
            {
                throw new ArgumentOutOfRangeException(" Day added " + day.Date +
                                                      " is out of range for this week FirstDate " + FirstDate);
            }
            var dayIndex = (int)day.Date.DayOfWeek - 1;

            DaysOfWeek[dayIndex] = day;
        }
예제 #2
0
 public void AddDay(TrainingCalendarDay day)
 {
     if ((day.Date < FirstDate) || (day.Date > LastDate))
         throw new ArgumentOutOfRangeException(" Day added " + day.Date +
                                               " is out of range for this week FirstDate " + FirstDate);
     var dayIndex = (int) day.Date.DayOfWeek - 1;
     DaysOfWeek[dayIndex] = day;
 }