Esempio n. 1
0
 public static void ImportData(
     this Business.Common.Entities.NonPersistent.Common.DateRange target,
     Legacy.Common.Entities.Common.DateRange source)
 {
     target.StartDate  = source.StartDate;
     target.FinishDate = source.FinishDate;
 }
Esempio n. 2
0
        private static void ImportData(
            this Business.Media.Entities.NonPersistent.Snapshot.Snapshot target,
            Legacy.Media.Entities.Snapshot.Snapshot source)
        {
            target.Index   = source.Index;
            target.Name    = source.Name;
            target.Comment = source.Comment;
            target.Logo.ImportData(source.Logo);
            if (source.TotalWeeks.HasValue)
            {
                target.TotalWeeks = source.TotalWeeks.Value;
            }

            target.ShowLineId       = source.ShowLineId;
            target.ShowLogo         = source.ShowLogo;
            target.ShowStation      = source.ShowStation;
            target.ShowProgram      = source.ShowProgram;
            target.ShowDaypart      = source.ShowDaypart;
            target.ShowLenght       = source.ShowLenght;
            target.ShowTime         = source.ShowTime;
            target.ShowRate         = source.ShowRate;
            target.ShowWeeklyCost   = source.ShowCost;
            target.ShowSpotsX       = source.ShowSpotsX;
            target.ShowTotalRow     = source.ShowTotalRow;
            target.UseDecimalRates  = source.UseDecimalRates;
            target.ShowSpotsPerWeek = source.ShowSpotsPerWeek;

            target.ShowWeeklySpots = source.ShowTotalSpots;
            target.ShowAverageRate = source.ShowAverageRate;

            target.ContractSettings.ImportData(source.ContractSettings);

            foreach (var oldProgram in source.Programs)
            {
                var program = new Business.Media.Entities.NonPersistent.Snapshot.SnapshotProgram(target);
                program.ImportData(oldProgram);
                target.Programs.Add(program);
            }
            target.RebuildProgramIndexes();

            foreach (var oldActiveWeek in source.ActiveWeeks)
            {
                var activeWeek = new Business.Common.Entities.NonPersistent.Common.DateRange();
                activeWeek.ImportData(oldActiveWeek);
                target.ActiveWeeks.Add(activeWeek);
            }
        }
		private static void ImportData(
			this Business.Media.Entities.NonPersistent.Snapshot.Snapshot target,
			Legacy.Media.Entities.Snapshot.Snapshot source)
		{
			target.Index = source.Index;
			target.Name = source.Name;
			target.Comment = source.Comment;
			target.Logo.ImportData(source.Logo);
			if (source.TotalWeeks.HasValue)
				target.TotalWeeks = source.TotalWeeks.Value;

			target.ShowLineId = source.ShowLineId;
			target.ShowLogo = source.ShowLogo;
			target.ShowStation = source.ShowStation;
			target.ShowProgram = source.ShowProgram;
			target.ShowDaypart = source.ShowDaypart;
			target.ShowLenght = source.ShowLenght;
			target.ShowTime = source.ShowTime;
			target.ShowRate = source.ShowRate;
			target.ShowWeeklyCost = source.ShowCost;
			target.ShowSpotsX = source.ShowSpotsX;
			target.ShowTotalRow = source.ShowTotalRow;
			target.UseDecimalRates = source.UseDecimalRates;
			target.ShowSpotsPerWeek = source.ShowSpotsPerWeek;

			target.ShowWeeklySpots = source.ShowTotalSpots;
			target.ShowAverageRate = source.ShowAverageRate;

			target.ContractSettings.ImportData(source.ContractSettings);

			foreach (var oldProgram in source.Programs)
			{
				var program = new Business.Media.Entities.NonPersistent.Snapshot.SnapshotProgram(target);
				program.ImportData(oldProgram);
				target.Programs.Add(program);
			}
			target.RebuildProgramIndexes();

			foreach (var oldActiveWeek in source.ActiveWeeks)
			{
				var activeWeek = new Business.Common.Entities.NonPersistent.Common.DateRange();
				activeWeek.ImportData(oldActiveWeek);
				target.ActiveWeeks.Add(activeWeek);
			}
		}