Esempio n. 1
0
		private static void LoadLateBindings ()
			{
			AltErlaaInfoEntities LateBindingContext = new AltErlaaInfoEntities (ServiceSource);
			IQueryable<PhysicalDataElement> AllDEs = from DE in LateBindingContext.PhysicalDataElement
											 select DE;
			foreach (PhysicalDataElement DataElementEntry in AllDEs)
				{
				if (String.IsNullOrEmpty (DataElementEntry.ControlAdressing))
					continue;
				if (DataElementEntry.TabellenName == "Personen")
					{
					PersonenInterface = Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "Adressen")
					{
					AdressenInterface = Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "Organisationen")
					{
					OrganisationenInterface =
						Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "Timings")
					{
					TimingsInterface = Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "Informationen")
					{
					InformationenInterface =
						Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "Remarks")
					{
					RemarksInterface = Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "Events")
					{
					EventsInterface = Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "ProcessConnector")
					{
					ProcessConnectorInterface = Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				if (DataElementEntry.TabellenName == "Materialien")
					{
					MaterialienInterface = Basics.GetLateBindingInstance (DataElementEntry.ControlAdressing) as ITemplateReadWrite;
					}
				}
			}
Esempio n. 2
0
		public List<SelectionDataClass> GetSelectionData (String BereichToUse, String ActiveUser, InformationenAddOn InfoAddOnParameter,
			TemplateElementManagement ConnectedTemplateElementManagement, TemplateManagement.AuswahlSelection EntriesToShow,
			TemplateManagement.AuswahlSortOrder SortOrder)
			{
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			IQueryable<Timings> TimingsDaten = from Tim in WebAccess.Timings
											   where Tim.ConnectedID == InfoAddOnParameter.InformationenID
												orderby Tim.TimeA descending 
												select Tim;

			List<SelectionDataClass> Result = new List<SelectionDataClass> ();
			foreach (Timings SelectionEntry in TimingsDaten)
				{
				SelectionDataClass SelectionData = new SelectionDataClass ();
				SelectionData.ID = SelectionEntry.TimingsID;
				SelectionData.ZurAuswahl = FormatFreitext (SelectionEntry, FreiTextFormat.Full);
				Result.Add (SelectionData);
				}
			return Result;
			}
Esempio n. 3
0
		public String GetTitle (System.Guid ID)
			{
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			IQueryable<Timings> AlleTimingsDaten
				= from Tim in WebAccess.Timings where 1 == 1 && Tim.TimingsID == ID select Tim;
			Timings TimingsDaten = AlleTimingsDaten.FirstOrDefault ();
			if ((TimingsDaten == null)
				|| (TimingsDaten.TimingsID == null)
				|| (TimingsDaten.TimingsID == System.Guid.Empty))
				return String.Empty;
			if ((TimingsDaten.TimingsID != null)
				&& (TimingsDaten.TimingsID != System.Guid.Empty))
				return TimingsDaten.TimingTypID;
			return String.Empty;
			}
		Informationen GetMyData (System.Guid ID)
			{
			if (ID == System.Guid.Empty)
				return (Informationen) GetEmptyEntity ();
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			Informationen InformationenDaten
				= (from Inf in WebAccess.Informationen where 1 == 1 && Inf.ID == ID select Inf).FirstOrDefault ();
			if ((InformationenDaten == null)
				|| (InformationenDaten.ID == null)
				|| (InformationenDaten.ID == System.Guid.Empty))
				return null;
			return InformationenDaten;
			}
Esempio n. 5
0
		private void MainWindow_OnLoaded (object Sender, RoutedEventArgs E)
			{
			AltErlaaInfoEntities ODataService = new AltErlaaInfoEntities (ServiceUri);
			DataCollection<CommonSearchClass> LastModifiedAll = null;	// = DataWrapper.Instance.GetLastModifiedAll (DateTime.Now.AddMonths (-1), DateTime.Now);
			int TestCounter = 0;
			foreach (CommonSearchClass Entry in LastModifiedAll)
				{
				// lazy loading for extreme Performance boost
				Informationen FullInfo = /* Entry.FullInfo = */ Informationen.GetFullChildTree(Entry.ID);

				foreach (InformationenAddOn InfoAddOn in FullInfo.InformationenAddOn_Additional)
					{

					if (InfoAddOn.StructuredContent_Additional != null)
						{
						if ((InfoAddOn.StructuredContent_Additional.GetType() == typeof(ProcessConnector))
							&& ((InfoAddOn.StructuredContent_Additional as ProcessConnector).ConnectedAddOnCommonClasses_Additional != null))
							{
							foreach (WPMediaAddOnCommonClass StandbildRoot in
										(InfoAddOn.StructuredContent_Additional as ProcessConnector).ConnectedAddOnCommonClasses_Additional)
								{
	//							if (StandbildRoot.Pages.Count () > 1)
								foreach (WPMediaAddOnPageClass Page in StandbildRoot.Pages)
									{
									BitmapSource Picture = Page.PagePicture;
									}
								}
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Adressen))
							{
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Events))
							{
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Personen))
							{
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Organisationen))
							{
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Remarks))
							{
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Materialien))
							{
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Timings))
							{
							}
						if (InfoAddOn.StructuredContent_Additional.GetType() == typeof(Remarks))
							{
							}

						}
					}


				if (TestCounter++ > 200)
					break;
				}
			
			}
Esempio n. 6
0
		public static Guid InsertOrModifyInformationenAddOn (Guid ID, Guid InformationenID, String TabellenName,
			 Guid TabelleID, DataTemplatesDescription Desc, String FreiText, bool MultipleEntriesAllowed)
			{
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			InformationenAddOn InfoAO = null;
			IQueryable<InformationenAddOn> OldEntries = from ExistingINF in WebAccess.InformationenAddOn
															where ExistingINF.InformationenID == InformationenID
																  && ExistingINF.DataDependencyID == Desc.ID
															select ExistingINF;
			int ExistingCounter = OldEntries.Count ();
			if (MultipleEntriesAllowed == false)
				{
				InfoAO = OldEntries.First ();
				ID = InfoAO.ID;
				}

			if (ID != Guid.Empty)
				{
				try
					{
					InfoAO.InformationenID = InformationenID;
					InfoAO.Tabelle = TabellenName;
					InfoAO.TabelleID = TabelleID;
					InfoAO.ActuallBezeichner = Desc.ActuallBezeichner;
					if (InfoAO.SortOrder == null)
						{
						if (MultipleEntriesAllowed)
							InfoAO.SortOrder = Desc.SortOrder + ExistingCounter;
						else
							InfoAO.SortOrder = Desc.SortOrder;
						}
					InfoAO.DataDependencyID = Desc.ID;
					InfoAO.FreiText = FreiText;
					InsertOrModifyEntity (null, InfoAO);
					return ID;
					}
				catch (Exception Excp)
					{
					Basics.ReportErrorToEventViewer ("TemplateManagement.InsertOrModifyInformationenAddOn",
							"Fehler bei UpdateObject von ID \"" + ID.ToString () + "\":\r\n"
							+ Excp.ToString());

					}
				}
			else
				{
				try
					{
					InfoAO = new InformationenAddOn ();
					InfoAO.InformationenID = InformationenID;
					InfoAO.Tabelle = TabellenName;
					InfoAO.TabelleID = TabelleID;
					InfoAO.ActuallBezeichner = Desc.ActuallBezeichner;
					if (InfoAO.SortOrder == null)
						{
						if (MultipleEntriesAllowed)
							InfoAO.SortOrder = Desc.SortOrder + ExistingCounter;
						else
							InfoAO.SortOrder = Desc.SortOrder;
						}
					InfoAO.DataDependencyID = Desc.ID;
					InfoAO.FreiText = FreiText;
					InsertOrModifyEntity (null, InfoAO);
					return InfoAO.ID;
					}
				catch (Exception Excp)
					{
					Basics.ReportErrorToEventViewer ("TemplateManagement.InsertOrModifyInformationenAddOn",
							"Fehler bei AddObject von ID \"" + ID.ToString () + "\":\r\n"
							+ Excp.ToString());
					}
				}
			return Guid.Empty;
			}
Esempio n. 7
0
		public static List<InformationenAddOn> GetMultiMediaEntries (Guid InformationenID)
			{
			AltErlaaInfoEntities InformationmenAddOnContext = new AltErlaaInfoEntities ();
			return (from InAdd in InformationmenAddOnContext.InformationenAddOn
					where InAdd.InformationenID == InformationenID && InAdd.ActuallBezeichner.IndexOf ("MultiMedia") != -1
					orderby InAdd.SortOrder
					select InAdd).ToList ();
			}
Esempio n. 8
0
		private static Dictionary<Guid, string> LoadOrganisationsSubTypen ()
			{
			AltErlaaInfoEntities LoadSubTypen = new AltErlaaInfoEntities (ServiceSource);
			IQueryable<OrganisationsSubTypen> SubTypen = from OSubTyp in LoadSubTypen.OrganisationsSubTypen select OSubTyp;
			Dictionary<Guid, string> Result = new Dictionary<Guid, string> ();
			foreach (OrganisationsSubTypen OSubTypEntry in SubTypen)
				{
				Result.Add (OSubTypEntry.ID, OSubTypEntry.OrganisationsSubTyp);
				}
			return Result;
			}
Esempio n. 9
0
		private static Dictionary<Guid, DataTemplatesDescription> LoadDataTemplatesDescriptions ()
			{
			AltErlaaInfoEntities LoadTemplates = new AltErlaaInfoEntities (ServiceSource);
			return (from Descript in LoadTemplates.DataTemplatesDescription orderby Descript.SortOrder
					select Descript).ToDictionary (P => P.ID);

			}
Esempio n. 10
0
		public static Dictionary<System.Guid, ProcessConnector> GetProcessConnectorForInformationenID (System.Guid InformationenID)
			{
				AltErlaaInfoEntities LoadConnector = new AltErlaaInfoEntities (ServiceSource);
				return (from T in LoadConnector.ProcessConnector
						where T.InformationenID == InformationenID
								orderby T.Redaktion
								select T).ToDictionary (p => p.ID);
			}
Esempio n. 11
0
		public static String GetMaterialContentViaName (Guid InformationenID, String NameOfTheContentToStore, out Materialien Material)
			{
			AltErlaaInfoEntities MaterialReader = new AltErlaaInfoEntities();
			Material = (from Mat in MaterialReader.Materialien
									where Mat.InformationenID == InformationenID
										&& Mat.NameID == NameOfTheContentToStore
									select Mat).FirstOrDefault();
			if ((Material == null)
				|| (Material.ID == Guid.Empty))
				return String.Empty;
			return LoadFileContentAsString (Material);
			}
Esempio n. 12
0
		public static StrassenNamen GetStrassenNamen (System.Guid StrassenID)
			{
			AltErlaaInfoEntities InformationenContext = new AltErlaaInfoEntities(ServiceSource);
			return (from c in InformationenContext.StrassenNamen where 1 == 1 && c.ID == StrassenID select c).FirstOrDefault();
			}
Esempio n. 13
0
		public static Haeuser GetHaeuser (System.Guid HausID)
			{
			AltErlaaInfoEntities InformationenContext = new AltErlaaInfoEntities(ServiceSource);
			return (from c in InformationenContext.Haeuser where 1 == 1 && c.ID == HausID select c).FirstOrDefault();
			}
Esempio n. 14
0
		public static Guid? GetTypIDForInfoAddOn (Guid? InformationenID)
			{
			AltErlaaInfoEntities InformationenContext = new AltErlaaInfoEntities (ServiceSource);
			Informationen ParentInformation = (from Info in InformationenContext.Informationen
											   where 1 == 1 && Info.ID == InformationenID
											   select Info).FirstOrDefault ();
			if (ParentInformation == null)
				return null;
			return ParentInformation.TypID;
			}
Esempio n. 15
0
		public static bool DoInformationenAddOnUpdate (Informationen ActuallInformation,
									List<ITemplateElementeBackgroundFunctions> EntriesTProcess)
			{
			AltErlaaInfoEntities InformationmenAddOnContext = new AltErlaaInfoEntities (ServiceSource);
			IQueryable<InformationenAddOn> OldInformationenAddOn = from InAdd in InformationmenAddOnContext.InformationenAddOn
																   where InAdd.InformationenID == ActuallInformation.ID
																   select InAdd;
			List<Guid> ProcessingHasBeenDone = new List<Guid> ();
			List<InformationenAddOn> ExistingEntriesToDelete = new List<InformationenAddOn> ();
			foreach (InformationenAddOn IAddOn in OldInformationenAddOn)
				{
				bool FoundInNew = false;
				foreach (ITemplateElementeBackgroundFunctions ElementManagement in EntriesTProcess)
					{
					if (ElementManagement.InfoAddOn == null)
						continue;
					if (IAddOn.ID == ElementManagement.InfoAddOn.ID)
						{
						if (((ElementManagement.InfoAddOn.TabelleID == null)
							 || (ElementManagement.InfoAddOn.TabelleID == Guid.Empty))
							&& (String.IsNullOrEmpty (ElementManagement.InfoAddOn.FreiText)))
							{
							ExistingEntriesToDelete.Add (IAddOn);
							break; // delete this Entry
							}
						if (ElementManagement.ParentTemplateRuntime_AnythingInTheWholeEntryHasBeenModified )
							{
							InsertOrModifyEntity (null, ElementManagement.InfoAddOn);
							}
						ProcessingHasBeenDone.Add (ElementManagement.InfoAddOn.ID);

						}
					}
				}

			foreach (InformationenAddOn IAddOn in ExistingEntriesToDelete)
				{
				DeleteEntity ("InformationenAddOn", IAddOn.ID);
				}

			foreach (ITemplateElementeBackgroundFunctions ElementManagement in EntriesTProcess)
				{
				if (ElementManagement.InfoAddOn == null)
					continue;
				if (MandatoryAddOns.ContainsKey(ElementManagement.InfoAddOn.ActuallBezeichner))
					continue;
				Guid ProcessedBeforeID = ElementManagement.InfoAddOn.ID;
				if (ProcessingHasBeenDone.Contains (ProcessedBeforeID))
					continue;
				if (((ElementManagement.InfoAddOn.TabelleID == null)
					|| (ElementManagement.InfoAddOn.TabelleID == Guid.Empty))
					&& (String.IsNullOrEmpty (ElementManagement.InfoAddOn.FreiText)))
					{
					continue;
					}
				InsertOrModifyEntity (ElementManagement, ElementManagement.InfoAddOn, true);
				}

			return true;
			}
Esempio n. 16
0
		private static Dictionary<string, FullDataElementeTemplates> LoadAllFullDataElementeTemplates ()
			{
			AltErlaaInfoEntities LoadTemplates = new AltErlaaInfoEntities (ServiceSource);
			return (from Descript in LoadTemplates.FullDataElementeTemplates
					where Descript.ActuallBezeichner != "Noch nicht definiert"
					select Descript)
				.ToDictionary (P => P.ActuallBezeichner);
			}
Esempio n. 17
0
		public static bool SetFreitext (Guid ID, String FreiText)
			{
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			InformationenAddOn ExistingEntry = (from ExistingINF in WebAccess.InformationenAddOn
												where 1 == 1 && ExistingINF.ID == ID
												select ExistingINF).FirstOrDefault ();
			
			if ((ExistingEntry == null)
				|| (ExistingEntry.ID == null)
				|| (ExistingEntry.ID == Guid.Empty))
				return false;
			if ((String.IsNullOrEmpty (ExistingEntry.FreiText))
				&& (String.IsNullOrEmpty (FreiText)))
				return true;
			ExistingEntry.FreiText = FreiText;
			if (InsertOrModifyEntity (null, ExistingEntry) == null)
				return false;
			return true;
			}
Esempio n. 18
0
		public static void ActualizeStandBildMapping (Guid ID)
			{
			if (ActuallStandBildMapping.ContainsKey(ID))
				ActuallStandBildMapping.Remove(ID);
			AltErlaaInfoEntities LoadStandBildMappings = new AltErlaaInfoEntities(ServiceSource);
			StandBildMapping NewEntry = (from Entry in LoadStandBildMappings.StandBildMapping
							where 1 == 1 && Entry.ID == ID
										 select Entry).FirstOrDefault();
			if ((NewEntry != null)
					&& (NewEntry.ID != null)
					&& (NewEntry.ID != Guid.Empty))
					ActuallStandBildMapping[ID] = NewEntry;
			}
Esempio n. 19
0
		public static DataCollection<InformationenAddOn> GetAllInformationenAddOnForInformation (Guid InformationenID)
			{
			AltErlaaInfoEntities InformationmenAddOnContext = new AltErlaaInfoEntities ();
			return new DataCollection<InformationenAddOn> (( from InAdd in InformationmenAddOnContext.InformationenAddOn
					where InAdd.InformationenID == InformationenID
					orderby InAdd.SortOrder
					select InAdd).ToList ());
			}
Esempio n. 20
0
		public static void ActualizeDataDependency(String ID)
			{
			if (DataTemplatesDescriptions.ContainsKey (Guid.Parse (ID)))
				DataTemplatesDescriptions.Remove (Guid.Parse (ID));
			AltErlaaInfoEntities LoadTemplates = new AltErlaaInfoEntities (ServiceSource);
			DataTemplatesDescription NewEntry = (from Descript in LoadTemplates.DataTemplatesDescription
			                                     where 1 == 1 && Descript.ID == System.Guid.Parse (ID)
			                                     select Descript).FirstOrDefault ();
			if ((NewEntry != null)
				&& (NewEntry.ID != null)
				&& (NewEntry.ID != Guid.Empty))
				DataTemplatesDescriptions[NewEntry.ID] = NewEntry;
			}
Esempio n. 21
0
		public static String GetZielgruppenForInformationID (Guid InformationenID,
								List<Guid> LocallyModifiedZielGruppen)
			{
			List<InformationenZuZielGruppen> AllZG;
			AltErlaaInfoEntities ZielGruppenContext = new AltErlaaInfoEntities ();
			AllZG = (from ZG in ZielGruppenContext.InformationenZuZielGruppen
					 where ZG.InformationenID == InformationenID
					 select ZG).ToList();
			List<string> Texte = new List<string>();

			if (LocallyModifiedZielGruppen != null)
				{
				foreach (Guid ZielGruppe in LocallyModifiedZielGruppen)
					{
					foreach (ZielGruppen Entry in ActuallZielGruppen)
						{
						if (ZielGruppe == Entry.ID)
							{
							Texte.Add(Entry.ZielGruppe);
							break;
							}
						}
					}
				}

			foreach (InformationenZuZielGruppen ZG in AllZG)
				{
				foreach (ZielGruppen Entry in ActuallZielGruppen)
					{
					if (ZG.ZielgruppenID == Entry.ID)
						{
						Texte.Add (Entry.ZielGruppe);
						break;
						}
					}
				}
			Texte.Sort ();
			return String.Join ("; ", Texte.ToArray ());
			}
Esempio n. 22
0
		public static void ActualizeFullDataElementeTemplates (String ID)
			{
			if (AllFullDataElementeTemplates.ContainsKey (ID))
				AllFullDataElementeTemplates.Remove(ID);
			AltErlaaInfoEntities LoadTemplates = new AltErlaaInfoEntities(ServiceSource);
			FullDataElementeTemplates NewEntry = (from Template in LoadTemplates.FullDataElementeTemplates
												  where 1 == 1 && Template.ID == System.Guid.Parse(ID)
												  select Template).FirstOrDefault();
			if ((NewEntry != null)
				&& (NewEntry.ID != null)
				&& (NewEntry.ID != Guid.Empty))
				AllFullDataElementeTemplates[ID] = NewEntry;
			}
Esempio n. 23
0
		private bool FillMe (System.Guid InformationenID, bool EditIsTrueShowIsFalse)
			{
			BeginInit ();
			if (WorkingInformationen == null)
				WorkingInformationen = GetMyData (InformationenID);
			if (WorkingInformationen == null)
				{
				WorkingInformationen = GetMyData (System.Guid.Empty);
				WorkingInformationen.ID = InformationenID;
				}
			RootGrid.DataContext = WorkingInformationen;
	
			if (EditIsTrueShowIsFalse)
				{
				ZielGruppenListBox.IsEnabled = true;
				TypComboBox.IsEditable = true;
				TypComboBox.IsHitTestVisible = true;
				KontaktDatenListBox.IsEnabled = false;
				TitelField.IsReadOnly = false;
				TitelField.IsEnabled = true;
				}
			else
				{
				ZielGruppenListBox.IsEnabled = false;
				TypComboBox.IsEditable = false;
				TypComboBox.IsHitTestVisible = false;
				KontaktDatenListBox.IsEnabled = false;
				TitelField.IsReadOnly = true;
				}
			FillTypeCombo (WorkingInformationen.TypID);
			FillStatusCombo (WorkingInformationen.Status);
			List<FullInformationenZuZielGruppen> ZielGruppenTable;
				AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			if (ConnectedTemplateElementManagement.LocallyModifiedZielGruppen != null)
				{
				ZielGruppenTable = new List<FullInformationenZuZielGruppen> ();
				foreach (System.Guid ZielGruppe in ConnectedTemplateElementManagement.LocallyModifiedZielGruppen)
					{
					FullInformationenZuZielGruppen ZielGruppeFull = (from Ziel in WebAccess.FullInformationenZuZielGruppen
					                                                 where Ziel.ZielgruppenID == ZielGruppe
					                                                 select Ziel).FirstOrDefault ();
					if ((ZielGruppeFull != null)
						&& (ZielGruppeFull.ID != null)
						&& (ZielGruppeFull.ID != System.Guid.Empty))
						ZielGruppenTable.Add(ZielGruppeFull);
					}
				}
			else
				{
				ConnectedTemplateElementManagement.LocallyModifiedZielGruppen = new List<Guid> ();
				ZielGruppenTable = (from Ziel in WebAccess.FullInformationenZuZielGruppen
				                    where Ziel.InformationenID == InformationenID
				                    select Ziel).ToList ();
				foreach (FullInformationenZuZielGruppen Entry in ZielGruppenTable)
					{
					ConnectedTemplateElementManagement.LocallyModifiedZielGruppen.Add ((System.Guid) Entry.ZielgruppenID);
					}
				}

			List<String> ActuallZielGruppen = new List<string> ();
			foreach (FullInformationenZuZielGruppen entry in ZielGruppenTable)
				{
				ListBoxItem Item = new ListBoxItem ();
				Item.Tag = entry.ZielgruppenID;
				Item.Content = entry.ZielGruppe;
				ZielGruppenListBox.Items.Add (Item);
				}

			FillAvailableZielGruppen (AvailableZielGruppenListBox, ZielGruppenListBox);
			List<String> KontaktDatenListe = GetKontaktDatenListe (InformationenID);
			KontaktDatenListBox.ItemsSource = KontaktDatenListe;
			EndInit ();
			return true;
			}
Esempio n. 24
0
		public static Informationen GetInformationen (Guid? InformationenID)
			{
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities();
			return (from ExistingINF in WebAccess.Informationen
					where 1 == 1 && ExistingINF.ID == InformationenID
					select ExistingINF).FirstOrDefault();
			}
Esempio n. 25
0
		Remarks GetMyData (System.Guid ID)
			{
			if (ID == System.Guid.Empty)
				return (Remarks) GetEmptyEntity ();
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			Remarks RemarksDaten
				= (from Rem in WebAccess.Remarks where 1 == 1 && Rem.ID == ID select Rem).FirstOrDefault();
			if ((RemarksDaten == null)
				|| (RemarksDaten.ID == null)
				|| (RemarksDaten.ID == System.Guid.Empty))
				return null;
			return RemarksDaten;
			}
Esempio n. 26
0
		public static InformationenAddOn GetInformationAddOn (String InfoAddOnID)
			{
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			return (from ExistingINF in WebAccess.InformationenAddOn
					where 1 == 1 && ExistingINF.ID == System.Guid.Parse(InfoAddOnID)
						select ExistingINF).FirstOrDefault ();
			}
Esempio n. 27
0
		public String GetFreitext (System.Guid ID, TemplateHandling.FreiTextFormat Format)
			{
			AltErlaaInfoEntities WebAccess
				= new AltErlaaInfoEntities ();
			IQueryable<Timings> AlleTimingsDaten
				= from Tim in WebAccess.Timings where 1 == 1 && Tim.TimingsID == ID select Tim;
			Timings TimingsDaten = AlleTimingsDaten.FirstOrDefault ();
			if ((TimingsDaten == null)
				|| (TimingsDaten.TimingsID == null)
				|| (TimingsDaten.TimingsID == System.Guid.Empty))
				return String.Empty;
			if ((TimingsDaten.TimingsID != null)
				&& (TimingsDaten.TimingsID != System.Guid.Empty))
				return FormatFreitext (TimingsDaten, Format);
			return String.Empty;
			}
Esempio n. 28
0
		private static bool DoZielGruppenUpdate (Informationen ActuallInformation, List<Guid> TargetZielgruppenSetting)
			{
			AltErlaaInfoEntities ZielGruppenAssignmentContext = new AltErlaaInfoEntities (ServiceSource);
			List<InformationenZuZielGruppen> OldAssignedZielGruppen =
				(from ZielGrp in ZielGruppenAssignmentContext.InformationenZuZielGruppen
								 where ZielGrp.InformationenID == ActuallInformation.ID
								 select ZielGrp).ToList ();
			foreach (Guid ZielGruppenID in TargetZielgruppenSetting)
				{
				int RemoveIndex = 0;
				bool Exists = false;
				foreach (InformationenZuZielGruppen Entry in OldAssignedZielGruppen)
					{
					if (Entry.ZielgruppenID == ZielGruppenID)
						{
						Exists = true;
						break;
						}
					RemoveIndex++;
					}
				if (Exists == true)
					{
					OldAssignedZielGruppen.RemoveAt (RemoveIndex);
					}
				else
					{
					InformationenZuZielGruppen NewEntry = new InformationenZuZielGruppen ();
					NewEntry.InformationenID = ActuallInformation.ID;
					NewEntry.ZielgruppenID = ZielGruppenID;
					InsertOrModifyEntity (null, NewEntry);
					}
				}
			foreach (InformationenZuZielGruppen DeleteableEntry in OldAssignedZielGruppen)
				{
				Guid ID = DeleteableEntry.ID;
				DeleteEntity ("InformationenZuZielGruppen", ID);
				}

			return true;
			}
Esempio n. 29
0
		Timings GetMyData (System.Guid ID)
			{
			if (ID == System.Guid.Empty)
				return (Timings) GetEmptyEntity ();
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			Timings TimingsDaten
				= (from Tim in WebAccess.Timings where 1 == 1 && Tim.TimingsID == ID select Tim).FirstOrDefault();
			if ((TimingsDaten == null)
				|| (TimingsDaten.TimingsID == null)
				|| (TimingsDaten.TimingsID == System.Guid.Empty))
				return null;
			return TimingsDaten;
			}
		ProcessConnector GetMyData (System.Guid ID)
			{
			if (ID == System.Guid.Empty)
				return (ProcessConnector) GetEmptyEntity ();
			AltErlaaInfoEntities WebAccess = new AltErlaaInfoEntities ();
			ProcessConnector ProcessConnectorDaten
				= (from PCD in WebAccess.ProcessConnector where 1 == 1 && PCD.ID == ID select PCD).FirstOrDefault();
			if ((ProcessConnectorDaten == null)
				|| (ProcessConnectorDaten.ID == null)
				|| (ProcessConnectorDaten.ID == System.Guid.Empty))
				return null;
			return ProcessConnectorDaten;
			}