private void ActiveInformationenChanged(Informationen OldValue, Informationen NewValue)
			{

			}
示例#2
0
 private void FillDescriptionalInformationData(Informationen FullInfo)
     {
     bool FirstTime = true;
     foreach (InformationenAddOn InfoAddOn in FullInfo.ConnectedInformationenAddOn)
         {
         EntryGroupPresentationModel Group = new EntryGroupPresentationModel()
             {
             HeadLine = InfoAddOn.ActuallBezeichner
             };
         DescriptionalContent.Add(Group);
         if (FirstTime)
             {
             Group.Items.Add(new EntryItemPresentationModel()
                 {
                 NameID = "Typ",
                 Content = "Nachrichten Agentur"
                 });
             FirstTime = false;
             }
         if (InfoAddOn.ConnectedTableClass == null)
             {
             Group.Items.Add(new EntryItemPresentationModel() {NameID = "", Content = InfoAddOn.FreiText});
             }
         else
             {
             InsertDataForOneClass(InfoAddOn.ConnectedTableClass, Group);
             }
         }
     }
			public void ProcessFinalUpdate (Informationen ActiveInfo)
				{
				if (ActiveInfo != DataModell.ActiveInformationen)
					{
					throw new Exception ("ActiveInfo != ActiveInformationen");
					}
				DataModell.ActiveInformationen.RegisterAssignedZielGruppen(AssignedZielGruppen);
				if (SelectedTreeEntryClass != null)
					DataModell.ActiveInformationen.RegisterEnteredTyp((SelectedTreeEntryClass.ConnectedObject
								as Typ).Id);
				bool CheckResult = CheckMissingDataResult(DataModell.ActiveInformationen.CheckForMissingData());
				DataModell.ActiveInformationen.ReadyForUpdate = !CheckResult;
				//UpdateDataModellInstance.SendPropertyChanged ("InformationenHeader");
				//if (!ActiveInformationen.ReadyForUpdate)
				//	{
				//	new ContentModellFactory().CreateInformationenAddOnForNewInformation(ActiveInformationen, (Object)UpdateDataModellInstance,
				//		UpdateDataModellInstance.InformationAndInformationenAddOns);
				//	ActiveInformationen.InformationenExpanded = true;
				//	}
				}
示例#4
0
		public Informationen LoadDBInformationenShortTreeFromEntryDataSet
				(DataSet EntryDataSet, Informationen ActiveInformationen = null)
			{
			if (EntryDataSet == null)
				return null;
			//				throw new Exception("EntryDataSet == null");
			if (EntryDataSet.Tables ["Informationen"].Rows.Count != 1)
				{
				throw new Exception ("EntryDataSet.Tables [\"Informationen\"].Rows.Count != 1");
				return null;
				}
			if (ActiveInformationen == null)
				ActiveInformationen = new Informationen(EntryDataSet.Tables["Informationen"].Rows[0]);
			else
				ActiveInformationen.SetNewData(EntryDataSet.Tables["Informationen"].Rows[0]);

			ActiveInformationen.Parent = this;
			foreach (DataRow InformationenAddOnRow in GetOrderedInformationenAddOn(EntryDataSet))
				{
				ActiveInformationen.ConnectedInformationenAddOn.Add(new InformationenAddOn(InformationenAddOnRow)
				{
					ParentInformationen = ActiveInformationen,
					Parent = this
				});
				}
			return ActiveInformationen;
			}
示例#5
0
		public Informationen LoadDBInformationenFullTreeFromEntryDataSet(DataSet EntryDataSet)
			{
			if (EntryDataSet == null)
				return null;
			if (EntryDataSet.Tables["Informationen"].Rows.Count != 1)
				return null;
			ActiveInformationen =
				new Informationen(EntryDataSet.Tables["Informationen"].Rows[0]);
			ActiveInformationen.Parent = this;
			foreach (DataRow InformationenAddOnRow in GetOrderedInformationenAddOn(EntryDataSet))
				{
				ActiveInformationen.ConnectedInformationenAddOn.Add(new InformationenAddOn(InformationenAddOnRow)
					{
					ParentInformationen = ActiveInformationen,
					Parent = this
					});
				FillConnectedTableClasses(ActiveInformationen.ConnectedInformationenAddOn.Last(), true);
				}
			return ActiveInformationen;
			}
示例#6
0
		public Informationen InformationenNewStart(Guid InformationenID)
			{
			WorkDataSet = GetDataSetForNewEntry();
			DataRow NewInformationen = WorkDataSet.Tables["Informationen"].NewRow();
			NewInformationen["ID"] = InformationenID;
			NewInformationen["CreatedBy"] = WMB.WPMediaApplicationState.Instance.Properties["UserName"].ToString().ToUpper();
			NewInformationen["NameID"] = DateTime.Now.ToString("yyyyMMddHHmmss_")
										  + WMB.WPMediaApplicationState.Instance.Properties["UserName"].ToString().ToUpper();
			WorkDataSet.Tables["Informationen"].Rows.Add(NewInformationen);

			ActiveInformationen = new Informationen(NewInformationen)
			{
				Parent = this
			};
			ActiveInformationen.ReadyForUpdate = true;
			if (InformationAndInformationenAddOns == null)
				InformationAndInformationenAddOns = new DataCollection<object>();
			InformationAndInformationenAddOns.Add(ActiveInformationen);

			return ActiveInformationen;
			}
示例#7
0
		public DataSet GetEntryDataSet(System.Guid InformationenID, Guid[] DontPresent = null,
					Guid[] PresentOnly = null, bool LoadTablesToo = true, bool RemoveTechnical = false)
			{
			//WCFStandards Helper = new WCFStandards ();
			String PresentClause = GetPresentDependingSelectClause(DontPresent, PresentOnly);
			WorkDataSet = BasicAccess.AltErlaaInfoDataBase.GetCommonMultiDataSet(new String[]
				{
				"Select * from InformationenAddOn where InformationenID = '" 
						+ InformationenID.ToString( ) + "' " + PresentClause + "  order by SortOrder",
				"Select * from InformationenZuZielGruppen where InformationenID = '"
 						+ InformationenID.ToString( ) + "'",
				"Select * from Informationen where ID = '" + InformationenID.ToString( ) + "'"
				});
			if (WorkDataSet.Tables["Informationen"].Rows.Count == 0)
				return null;
			ActiveInformationen = new Informationen(WorkDataSet.Tables["Informationen"].Rows [0]);
			List<string> TableCommands = new List<string>();
			foreach (DataRow InfoAddOn in GetOrderedInformationenAddOn(WorkDataSet))
				{
				ActiveInformationen.ConnectedInformationenAddOn.Add(new InformationenAddOn(InfoAddOn)
				{
					ParentInformationen = ActiveInformationen
				});
				if (String.IsNullOrEmpty(InfoAddOn["Tabelle"].ToString()))
					continue;
				if ((InfoAddOn["TabelleID"] == Convert.DBNull))
					continue;
				String Tabelle = InfoAddOn["Tabelle"].ToString();
				if (Tabelle == "Informationen")
					continue;
				if ((InfoAddOn["TabelleID"] == Convert.DBNull)
					|| ((Guid)InfoAddOn["TabelleID"] == Guid.Empty))
					continue;
				String TabelleID = InfoAddOn["TabelleID"].ToString();
				String NameOfIDItem = "ID";
				if (Tabelle == "Timings")
					NameOfIDItem = "TimingsID";
				//if ((Tabelle == "Personen")
				//	|| (Tabelle == "Adressen")
				//	|| (Tabelle == "Organisationen"))
				//	{
				//	Tabelle += "Full";
				//	}
				String NewCommand = "Select * from " + Tabelle + " where " + NameOfIDItem + " = '" + TabelleID + "'";
				if (!TableCommands.Contains(NewCommand))
					TableCommands.Add (NewCommand);
				}
			if (!LoadTablesToo)
				return WorkDataSet;
			if (WorkDataSet.Tables.Contains("RuntimeErrors"))
				throw new Exception("in GetEntryDataSet - WorkDataSet.Tables.Contains (\"RuntimeErrors\")");
			DataSet TabellenDataSet = BasicAccess.AltErlaaInfoDataBase.GetCommonMultiDataSet(TableCommands.ToArray());
			if (TabellenDataSet.Tables.Contains("RuntimeErrors"))
				throw new Exception("in GetEntryDataSet - TabellenDataSet.Tables.Contains (\"RuntimeErrors\")");
			List<DataTable> TablesToMove = new List<DataTable>();
			WMB.Basics.MergeDataSetIntoDataSet (WorkDataSet, TabellenDataSet);
			if (WorkDataSet.Tables.Contains("RuntimeErrors"))
				throw new Exception("in GetEntryDataSet - after Merge n- WorkDataSet.Tables.Contains (\"RuntimeErrors\")");
			//foreach (DataTable TabTable in TabellenDataSet.Tables)
			//	{
			//	TablesToMove.Add (TabTable);
			//	}
			//foreach (DataTable TableToMove in TablesToMove)
			//	{
			//	TabellenDataSet.Tables.Remove (TableToMove);
			//	WorkDataSet.Tables.Add (TableToMove);
			//	}
			if (RemoveTechnical)
				return RemoveTechnicalFieldsFromDataSet(WorkDataSet);
			return WorkDataSet;
			}
示例#8
0
		public void RemoveRemoveableInformationenAddOn(Informationen InformationenToCleanUp, DataSet DataSetToCleanUp)
			{
			Dictionary<Guid, List<InformationenAddOn>> DictOfEntriesToCheck
				= new Dictionary<Guid, List<InformationenAddOn>>();
			List<Guid> ListOfEntryIDsToCheck = new List<Guid>();
			foreach (InformationenAddOn Entry in InformationenToCleanUp.ConnectedInformationenAddOn)
				{
				if (ListOfEntryIDsToCheck.Contains((Guid)Entry.DataDependencyID))
					continue;
				DataProfileClasses.DataDependencyClasses.DataDependency DD
					= DataDependencyCacheInstance.AllDataDependency[(Guid)Entry.DataDependencyID];
				DataProfileClasses.DataElementeTemplatesClasses.DataElementeTemplates DET
					= DataElementeTemplatesCacheInstance.AllDataElementeTemplates
						[(Guid) DD.DataElementeTemplatesID];
				if (DET.DeleteEntryIfNotUsed != "Yes")
					continue;
				ListOfEntryIDsToCheck.Add((Guid)Entry.DataDependencyID);
				}

			foreach (Guid EntryIDToCheck in ListOfEntryIDsToCheck)
				{
				bool FilledEntryFound = false;
				bool FirstEmptyEntry = true;
				foreach (InformationenAddOn Entry in InformationenToCleanUp.ConnectedInformationenAddOn)
					{
					if (EntryIDToCheck != ((Guid)Entry.DataDependencyID))
						continue;
					if ((Entry.TabelleID != null)
						&& (Entry.TabelleID != Guid.Empty))
						{
						FilledEntryFound = true;
						continue;
						}


					if (DictOfEntriesToCheck.ContainsKey((Guid)Entry.DataDependencyID))
						DictOfEntriesToCheck[(Guid)Entry.DataDependencyID].Add(Entry);
					else
						DictOfEntriesToCheck[(Guid)Entry.DataDependencyID] = new List<InformationenAddOn>() { Entry };
					}

				foreach (List<InformationenAddOn> InfosToProcess in DictOfEntriesToCheck.Values)
					{
					foreach (InformationenAddOn InfoToProcess in InfosToProcess)
						{
						if (FilledEntryFound)
							{
							FilledEntryFound = false;
							continue;
							}
						if (FirstEmptyEntry)
							{
							FirstEmptyEntry = false;
							continue;
							}
						InformationenToCleanUp.ConnectedInformationenAddOn.Remove(InfoToProcess);
						InfoToProcess.BasisRow.AcceptChanges();
						}
					}
				}
			}
示例#9
0
		public void DeleteDeleteableInformationen(Informationen InformationenToCleanUp,
			DataSet DataSetToCleanUp)
			{
			foreach (DataTable Table in DataSetToCleanUp.Tables)
				{
				if ((Table.TableName == "Informationen")
					|| (Table.TableName == "Timings"))
					//if ((Table.Columns.Contains("InformationenID"))
					//	|| (Table.TableName == "Informationen")
					//	|| (Table.TableName == "Timings"))
						foreach (DataRowView RowView in Table.DefaultView)
						{
						RowView.Row.Delete();
						}
				}
			}
示例#10
0
		private void ActiveInformationenInstanceChanged(Informationen InformationenOld,
					Informationen InformationenNew)
			{
			}
示例#11
0
		//public List<String> GetMaterialElementeForThisInformation(String InformationenID)
		//	{
		//	return GetMaterialElementeForThisInformation(InformationenID);
		//	}
		public static List<String> GetMaterialElementeForThisInformation(Informationen Information)
			{
			List<String> TechnicalElementeForThisInformation = new List<String>();
			foreach (InformationenAddOn PictureElementAddOn in Information.ConnectedInformationenAddOn)
				{
				if (String.IsNullOrEmpty(PictureElementAddOn.TechnicalAddOn))
					continue;
				String[] SingleTechnicalAddOn = PictureElementAddOn.TechnicalAddOn.Split(';');
				foreach (String Entry in SingleTechnicalAddOn)
					TechnicalElementeForThisInformation.Add(Entry.Trim());
				}
			return TechnicalElementeForThisInformation;
			}
		public void DoModifyWorkListEntry(CommonSearchClass CSC, Informationen ActivInfo, Guid? InfoID)
			{
			UpdateDataModellInstance.UpdateFunction = RequiredUpdateFunction.Modify;
			}
示例#13
0
		private bool ProcessSingleEntryFilling (DefaultFillings Filling, Informationen Info,
						InformationenAddOn SourceInfoAddOn)
			{
			switch (Filling.ContentTypProperty)
				{
				case DefaultFillings.ContentTyp.BannerConnector:
					DoConnectorDefaults("Banner", "BannerData", "WPMediaAddOnDataConnectionString");
					break;
				case DefaultFillings.ContentTyp.StandBildConnector:
					DoConnectorDefaults("StandBild", "WohnParkInfo", "WPMediaAddOnDataConnectionString");
					break;
				case DefaultFillings.ContentTyp.BerichtConnector:
					DoConnectorDefaults("StandBild", "LiesingInfo", "WPMediaAddOnDataConnectionString");
					break;

				case DefaultFillings.ContentTyp.BannerTiming:
					DoTimingsDefault("BannerVonBis", -3, SourceInfoAddOn);
					break;
				case DefaultFillings.ContentTyp.StandBildTiming:
					DoTimingsDefault("AnzVonBis", -14, SourceInfoAddOn);
					break;
				case DefaultFillings.ContentTyp.BerichtStandBildTiming:
					DoTimingsDefault("AnzVonBis", -14, SourceInfoAddOn);
					break;

				case DefaultFillings.ContentTyp.EventTimings:
					DoEventTimingsDefault ("EventVonBis", 0);
					break;
				case DefaultFillings.ContentTyp.BerichtTimings:
					DoBerichtTimingsDefault ("AktivVonBis", 14);
					break;
				}
			return true;
			}
		private FlowDocument FillFinalDocumentToShow(Informationen Info, bool MultimediaIsIncluded = false)
			{
			List<FlowDocumentBasis> RichTextLists = new List<FlowDocumentBasis> ();
			FlowDocumentBasis InfoHeader = new FlowDocumentBasis(Info.TypName + "-" + Info.Titel, null);
			InfoHeader.UnderlineRequired = true;
			RichTextLists.Add(InfoHeader);
			if (Info.ConnectedInformationenAddOn.Count == 0)
				return new FlowDocument();
			//String ActuallBezeichner = Info.Typ + " - " + Info.Titel;	
			//RichTextLists.Add (new FlowDocumentBasis(ActuallBezeichner,
			//										 GetPresentationSection(String.Empty)));

			foreach (InformationenAddOn Entry in Info.ConnectedInformationenAddOn)
				{
				if ((MultimediaIsIncluded)
					& (Entry.ActuallBezeichner.IndexOf("MultiMedia") != -1))
					continue;
				RichTextLists.Add(new FlowDocumentBasis(Entry.ActuallBezeichner,
						GetPresentationSection(Entry)));
				}

			FlowDocument Return = new FlowDocument();

			foreach (FlowDocumentBasis FlowEntry in RichTextLists)
				{
				Section SectionForOneEntry = new Section();
				SectionForOneEntry.Margin = new Thickness(0);
				if (!String.IsNullOrEmpty(FlowEntry.HeadLine))
					{
					Paragraph HeadLineP = new Paragraph(new Run(FlowEntry.HeadLine));
					if ((FlowEntry.UnderlineRequired != null)
						&& (FlowEntry.UnderlineRequired == true))
						HeadLineP.TextDecorations.Add(TextDecorations.Underline);
					HeadLineP.Margin = new Thickness(0, 0, 0, 0);
					HeadLineP.FontWeight = FontWeights.Bold;
					SectionForOneEntry.Blocks.Add(HeadLineP);
					}
				if (FlowEntry.ElementSection != null)
					{
					FlowEntry.ElementSection.Margin = new Thickness(20, 0, 0, 10);
					SectionForOneEntry.Blocks.Add(FlowEntry.ElementSection);
					}
				Return.Blocks.Add(SectionForOneEntry);
				}
			return Return;
			}
示例#15
0
		private void OnModifyWorkListEntryRequired(CommonSearchClass CSC, Informationen ActivInfo, Guid? InfoID)
			{
			if (InfoID == null)
				return;
			if (InfoID != ActiveInformationenID)
				throw new Exception ("InfoID != ActiveInformationenID");
			UpdateDataModellInstance = new UpdateDataModell();
			WorkListModellInstance.RefUpdateDataModellInstance = UpdateDataModellInstance;
			UpdateDataModellInstance.UpdateFunction = RequiredUpdateFunction.Modify;
			UpdateDataModellInstance.InformationenID = (Guid)InfoID;
			AltErlaaInfoUpdateDataControlInstance.DoModifyWorkListEntry(CSC, ActivInfo, InfoID);
			UpdateDataModellInstance.LoadStartupConfiguration(UpdateDataModellInstance);
			SetVisibilityToUpdate();
			}
示例#16
0
		private void OnAddNewWorkListEntryRequired(CommonSearchClass CSC, Informationen ActivInfo, Guid? InfoID)
			{
			UpdateDataModellInstance = new UpdateDataModell();
			if (UpdateDataModellInstance.DataModell.MakePersistentRequired ())
				{
				WorkListModell.Factory.ForceCloseCheck ();
				}
			WorkListModellInstance.RefUpdateDataModellInstance = UpdateDataModellInstance;
			UpdateDataModellInstance.UpdateFunction = RequiredUpdateFunction.InsertNew;
			UpdateDataModellInstance.InformationenID = Guid.NewGuid();
			AltErlaaInfoUpdateDataControlInstance.DoAddNewWorkListEntry(CSC, ActivInfo, InfoID);
			UpdateDataModellInstance.LoadStartupConfiguration(UpdateDataModellInstance);
			SetVisibilityToUpdate();
			}