public static void ImportData(this MediaScheduleSettings target, RegularSchedule source) { target.BusinessName = source.BusinessName; target.DecisionMaker = source.DecisionMaker; target.Status = source.Status; target.PresentationDate = source.PresentationDate; target.UserFlightDateStart = source.UserFlightDateStart; target.UserFlightDateEnd = source.UserFlightDateEnd; target.MondayBased = source.MondayBased; target.UseDemo = source.UseDemo; target.ImportDemo = source.ImportDemo; target.Demo = source.Demo; target.Source = source.Source; target.DemoType = (Business.Media.Enums.DemoType)(Int32)source.DemoType; target.SelectedSpotType = (Business.Media.Enums.SpotType)(Int32)source.SelectedSpotType; target.Source = source.Source; foreach (var oldDaypart in source.Dayparts) { var daypart = new Business.Media.Entities.NonPersistent.Schedule.Daypart(); daypart.ImportData(oldDaypart); target.Dayparts.Add(daypart); } foreach (var oldStation in source.Stations) { var station = new Business.Media.Entities.NonPersistent.Schedule.Station(); station.ImportData(oldStation); target.Stations.Add(station); } target.DigitalProductListViewSettings.ImportData(source.ViewSettings.HomeViewSettings); target.DigitalPackageSettings.ImportData(source.ViewSettings.DigitalPackageSettings); }
public Snapshot(RegularSchedule parent) { UniqueID = Guid.NewGuid(); Programs = new List<SnapshotProgram>(); ActiveWeeks = new List<DateRange>(); ContractSettings = new ContractSettings(); }
public OptionSet(RegularSchedule parent) { UniqueID = Guid.NewGuid(); TotalPeriods = 1; Programs = new List<OptionProgram>(); ContractSettings = new ContractSettings(); }
public bool RunConversion(string sourcePath) { try { foreach (var oldSchedulePath in Directory.GetFiles(sourcePath, "*.xml")) { var oldSchedule = new RegularSchedule(oldSchedulePath); Application.DoEvents(); if (_sceduleManager.SchedulesContainer.Schedules.Any(s => s.Name.Equals(oldSchedule.Name, StringComparison.OrdinalIgnoreCase))) continue; _sceduleManager.AddSchedule(oldSchedule.Name); Application.DoEvents(); _sceduleManager.ActiveSchedule.ImportData(oldSchedule); _sceduleManager.ActiveSchedule.Save(); Application.DoEvents(); } return true; } catch (Exception ex) { throw ex; } }
public static void ImportData( this Business.Media.Entities.NonPersistent.Snapshot.SnapshotContent target, RegularSchedule source) { foreach (var oldSnapshot in source.Snapshots) { var snapshot = new Business.Media.Entities.NonPersistent.Snapshot.Snapshot(target); snapshot.ImportData(oldSnapshot); target.Snapshots.Add(snapshot); } target.SnapshotSummary.ImportData(source.SnapshotSummary); }
public static ProgramSchedule Create(RegularSchedule parent) { switch (parent.SelectedSpotType) { case SpotType.Week: return new WeekSchedule(parent); case SpotType.Month: return new MonthSchedule(parent); default: return null; } }
public static void ImportData( this Business.Media.Entities.NonPersistent.Option.OptionsContent target, RegularSchedule source) { foreach (var oldOptionSet in source.Options) { var optionSet = new Business.Media.Entities.NonPersistent.Option.OptionSet(target); optionSet.ImportData(oldOptionSet); target.Options.Add(optionSet); } target.OptionsSummary.ImportData(source.OptionsSummary); }
public static void ImportData( this Business.Online.Entities.NonPersistent.DigitalProductsContent target, RegularSchedule source) { foreach (var oldDigitalProduct in source.DigitalProducts) { var diigitalProduct = new Business.Online.Entities.NonPersistent.DigitalProduct(target); diigitalProduct.ImportData(oldDigitalProduct); target.DigitalProducts.Add(diigitalProduct); } target.DigitalProductSummary.ImportData(source.DigitalProductSummary); }
public static void ImportData(this MediaSchedule target, RegularSchedule source) { target.Settings.ImportData(source); Application.DoEvents(); target.ProgramSchedule.ImportData(source.ProgramSchedule); Application.DoEvents(); target.DigitalProductsContent.ImportData(source); Application.DoEvents(); target.SnapshotContent.ImportData(source); Application.DoEvents(); target.OptionsContent.ImportData(source); Application.DoEvents(); target.GetSchedulePartitionContent<BroadcastCalendar>(SchedulePartitionType.BroadcastCalendar) .ImportData(source.BroadcastCalendar); Application.DoEvents(); target.GetSchedulePartitionContent<CustomCalendar>(SchedulePartitionType.CustomCalendar) .ImportData(source.CustomCalendar); Application.DoEvents(); }
public WeekSchedule(RegularSchedule parent) : base(parent) { }
protected ProgramSchedule(RegularSchedule parent) { Parent = parent; DigitalLegend = new DigitalLegend(); Sections = new List<ScheduleSection>(); }
public MonthSchedule(RegularSchedule parent) : base(parent) { }
public SnapshotSummary(RegularSchedule parent) { ApplySettingsForAll = false; ContractSettings = new ContractSettings(); }