Esempio n. 1
0
		public void RefreshBeitragsTimings( AutoCreationTyp autoCreationTyp)
			{
			if (autoCreationTyp == null)
				autoCreationTyp = AutoCreationTypUsed;
			if (autoCreationTyp.BeitragEndeDistanzZuInfoStop != null)
				{
				TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeB
						= ((DateTime)TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeB).Date
							.AddDays((double)autoCreationTyp.BeitragEndeDistanzZuInfoStop).AddMinutes(1439);
				}
			if (autoCreationTyp.BeitragEndeDistanzZuInfoStart != null)
				{
				TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeB
						= ((DateTime)TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeA).Date
							.AddDays((double)autoCreationTyp.BeitragEndeDistanzZuInfoStart).Date.AddMinutes(1439);
				}

			if (autoCreationTyp.BeitragStartDistanzZuInfoStop != null)
				{
				TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeA
						= ((DateTime)TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeB).Date
							.AddDays((double)autoCreationTyp.BeitragStartDistanzZuInfoStop);
				}
			if (autoCreationTyp.BeitragStartDistanzZuInfoStart != null)
				{
				TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeA
						= ((DateTime)TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeA).Date
							.AddDays((double)autoCreationTyp.BeitragStartDistanzZuInfoStart).Date;
				}

			if (autoCreationTyp.BeitragDuration != null)
				{
				if (TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeB != null)
					TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeA
						= ((DateTime)TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeB).AddDays((double) autoCreationTyp.BeitragDuration);
				else
					TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeB
						= ((DateTime)TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeA).AddDays((double)autoCreationTyp.BeitragDuration);
				}

			TimingsGroupContainer.StandBildTimingsModells[0].TimingToProcess.TimeB
					= ((DateTime)TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeB).Date.AddMinutes(1439);
			}
Esempio n. 2
0
		public void DoStartup(AutoCreationTyp autoCreationTyp, DateTime startDateTimeToUse)
			{
			if (TimingsGroupContainer == null)
				{
				TimingsGroupContainer = new TimingsGroupContainerModell()
					{
					ParentInformation = InformationToProcess,
					ParentTypId = autoCreationTyp.TypToUseId,
					AutoCreationTypUsed = autoCreationTyp
					};
				TimingsGroupContainer.Create(InformationToProcess);
				}
			AutoCreationTypUsed = autoCreationTyp;


			TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeA = startDateTimeToUse
				.AddHours((int) autoCreationTyp.DefaultStartHours)
				.AddMinutes((int) autoCreationTyp.DefaultStartMinutes);
			TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeB 
				= ((DateTime)TimingsGroupContainer.InformationenTimingsModells[0].TimingToProcess.TimeA)
				.AddMonths((int) autoCreationTyp.DefaultDurationMonths)
				.AddDays((int) autoCreationTyp.DefaultDurationDays)
				.AddHours((int) autoCreationTyp.DefaultDurationHours)
				.AddMinutes((int) autoCreationTyp.DefaultDurationMinutes);

//			RefreshBeitragsTimings(autoCreationTyp);
			}