Exemplo n.º 1
0
		private String FormatFreitext (Timings TimingsDaten, TemplateHandling.FreiTextFormat Format)
			{
			if (TimingsDaten == null)
				return String.Empty;
			if ((TimingsDaten.TimeA == null)
				|| (TimingsDaten.TimeB == null))
				return String.Empty;
			StringBuilder Elemente = new StringBuilder ();
			if ((TimingsDaten.TimingTypID != "EventVonBis")
				&& (TimingsDaten.TimingTypID != "AktivVonBis"))
				{
				Elemente.Append (TimingsDaten.TimingTypID);
				Elemente.Append ("  - " + ((DateTime) TimingsDaten.TimeA).ToString ("dddd, d MMM yyyy ")
				                 + ((DateTime) TimingsDaten.TimeA).ToString ("HH:mm"));
				}
			else
				{
				Elemente.Append (((DateTime) TimingsDaten.TimeA).ToString ("dddd, d MMM yyyy ")
								 + ((DateTime) TimingsDaten.TimeA).ToString ("HH:mm"));
				}
			if (((DateTime) TimingsDaten.TimeA).Date == ((DateTime) TimingsDaten.TimeB).Date)
				Elemente.Append (" bis " + ((DateTime) TimingsDaten.TimeB).ToString (" HH:mm ") + " Uhr");
			else
				Elemente.Append (" bis " + ((DateTime) TimingsDaten.TimeB).ToString ("dddd, d MMM yyyy ")
							+ ((DateTime) TimingsDaten.TimeB).ToString ("HH:mm") + " Uhr");
			return Elemente.ToString ().Replace ("  ", " ");
			}
Exemplo n.º 2
0
		public Object GetEmptyEntity ()
			{
			Timings NewTiming = new Timings ();
			NewTiming.TimeA = GetDefaultTimeAOrB ();
			NewTiming.TimeB = GetDefaultTimeAOrB ();
			NewTiming.TimingTypID = "EventVonBis";
			NewTiming.ConnectedType = "Informationen";
//			NewTiming.LastUpdateToken = WMB.Basics.GetNextLastUpdateTokenHelperAsByteArray ();
			return NewTiming;
			}