Example #1
0
        /// <summary>
        /// Convert ScheduleDAO into Schedule.
        /// </summary>
        /// <param name="scheduleDAO">The ScheduleDAO to convert.</param>
        /// <returns>The Schedule.</returns>
        public static Schedule MapToSchedule(ScheduleDAO scheduleDAO)
        {
            RegistrationData data = new RegistrationData();

            Schedule schedule = data.FindOrCreateSchedule(scheduleDAO.Id);

            schedule.ScheduleId = scheduleDAO.Id;
            schedule.StartTime  = scheduleDAO.StartTime;
            schedule.TimeBlocks = scheduleDAO.TimeBlocks;

            return(schedule);
        }
Example #2
0
 public ScheduleDAO GetSchedule(int scheduleId)
 {
     return(Mapper.MapToScheduleDAO(data.FindOrCreateSchedule(scheduleId)));
 }