Ejemplo n.º 1
0
        /// <summary>
        /// Возвращает расписание на конкретный день исходя из актуального расписания врача
        /// </summary>
        private WorkDay GetDayOfWeekInSchedule(Schedule schedule, DateTime dateForSearching)
        {
            switch (dateForSearching.DayOfWeek)
            {
            case DayOfWeek.Monday:
                return(_workDayRepository.GetById(schedule.MondayId));

            case DayOfWeek.Tuesday:
                return(_workDayRepository.GetById(schedule.TuesdayId));

            case DayOfWeek.Wednesday:
                return(_workDayRepository.GetById(schedule.WednesdayId));

            case DayOfWeek.Thursday:
                return(_workDayRepository.GetById(schedule.ThursdayId));

            case DayOfWeek.Friday:
                return(_workDayRepository.GetById(schedule.FridayId));

            case DayOfWeek.Saturday:
                return(_workDayRepository.GetById(schedule.SaturdayId));

            case DayOfWeek.Sunday:
                return(_workDayRepository.GetById(schedule.SundayId));
            }
            return(null);
        }
Ejemplo n.º 2
0
 public WorkDay GetWorkDayById(int workDayId)
 {
     return(_workDayRepository.GetById(workDayId));
 }