private Schedule MapEntityToSchedule(Entity.ReportSchedule eSchedule) { var schedule = new Schedule(); if (null != eSchedule) { schedule.ReportType = eSchedule.ReportType; schedule.Week = eSchedule.WeekDay; schedule.Time = new TimeSpan(eSchedule.Time); } return(schedule); }
private Entity.ReportSchedule MapScheduleToEntity(Schedule schedule) { var eSchedule = new Entity.ReportSchedule(); if (null != schedule) { eSchedule.ReportType = schedule.ReportType; eSchedule.WeekDay = byte.Parse(schedule.Week.ToString()); eSchedule.Time = null != schedule.Time ? schedule.Time.Ticks : 0; } return(eSchedule); }