public DailyScheduleWrite(DailySchedule s)
 {
     Day d;
     if (Enum.TryParse(s.DayOfWeek, out d))
         DayOfWeek = d;
     this.Switchpoints = (
         from a in s.Switchpoints
         select new SwitchpointWrite(a)).ToList();
 }
        public DailyScheduleWrite(DailySchedule s)
        {
            Day d;

            if (Enum.TryParse(s.DayOfWeek, out d))
            {
                DayOfWeek = d;
            }
            this.Switchpoints = (
                from a in s.Switchpoints
                select new SwitchpointWrite(a)).ToList();
        }