internal void CopyFrom(ArticleSchedule schedule) { EndDate = schedule.EndDate; PublicationDate = schedule.PublicationDate; ScheduleType = schedule.ScheduleType; StartDate = schedule.StartDate; StartRightNow = schedule.StartRightNow; WithoutEndDate = schedule.WithoutEndDate; Recurring = schedule.Recurring.Clone(); }
public static ArticleSchedule CreateSchedule(Article item) { var result = new ArticleSchedule(); result.ScheduleType = item.Visible ? ScheduleTypeEnum.Visible : ScheduleTypeEnum.Invisible; result.ArticleId = item.Id; result.Article = item; result.StartDate = ScheduleHelper.DefaultStartDate; result.EndDate = ScheduleHelper.DefaultEndDate; result.PublicationDate = ScheduleHelper.DefaultStartDate; result.WithoutEndDate = true; result.Recurring = RecurringSchedule.Empty; return(result); }