public void FillMeFromBeitragBeschreibung(CommonSearchClass SearchRoot) { if (SearchRoot == null) return; String TableName = SearchRoot.TypNameID; String NameID = SearchRoot.Titel; LastUpdateTime = SearchRoot.ModifyTimeStamp; Titel = SearchRoot.Titel; CommonSearchClass.TypeOfEntry EntryType = (CommonSearchClass.TypeOfEntry) Enum.Parse(typeof (CommonSearchClass.TypeOfEntry), SearchRoot.TechnischerBeitragTyp); switch (EntryType) { case CommonSearchClass.TypeOfEntry.Information: FillMeAsInformationEntry(SearchRoot); break; case CommonSearchClass.TypeOfEntry.Presse: FillMeAsPresseEntry(SearchRoot); break; case CommonSearchClass.TypeOfEntry.Video: FillMeAsVideoEntry(SearchRoot); break; case CommonSearchClass.TypeOfEntry.ExternesProgramm: FillMeAsExternesProgrammEntry(SearchRoot); break; case CommonSearchClass.TypeOfEntry.StandBildTV: FillMeAsStandBildTVEntry(SearchRoot); break; } }
public static Guid? CreateOrRecreateWorkListEntry(Guid InformationenIDToRefresh, String InputString, String AVID, ref CommonSearchClass SelectedEntry) { AlpenVereinWebDataModel AVModell = new AlpenVereinWebDataModel(); //TemplateManagement.DoCompleteDelete(InformationenIDToRefresh); //AVModell.LoadFromString(InputString, AVID); //AVModell.CreateAVEventDataRoot(); //AVModell.CheckAgainstStoredMaterial(); //TemplateRuntime CreationRuntime = new TemplateRuntime(); //CreationRuntime.IsUIMode = false; //CreationRuntime.CreateAndStoreAVBasisForOneEntry(AVModell.AVEventDataRoot.Events.First( )); //Materialien Material = null; //InformationenAddOn InfoAddOn = null; //DataModell.InsertOrUpdateNewMaterial(AVModell.AVEventDataRoot.Events.First().InformationenID, ref InfoAddOn, ref Material, // InputString, AVID, "txt"); return AVModell.AVEventDataRoot.Events.First ().InformationenID; }
public void ProcessStandBildConnection (CommonSearchClass Element, String TableTypeToCreate) { ConnectionDataModell ConnectionDataModellInstance = new ConnectionDataModell (); ConnectionDataModellInstance.InformationenID = Element.InformationenConnectedEntry.ID; String ReturnMessage = String.Empty; List<ProcessConnector> ProcessConnectorList = ConnectionDataModellInstance.LocateConnectorsForRedaktion (TableTypeToCreate, out ReturnMessage); foreach (ProcessConnector Entry in ProcessConnectorList) { ConnectionDataModellInstance.ActiveProcessConnector = Entry; ConnectionDataModellInstance.DoStandBildProgrammActivities (ConnectionDataModellInstance.ActiveProcessConnector); break; } }
public DataSet GetEntryDataSet(CommonSearchClass SearchEntry) { return GetEntryDataSet((System.Guid)SearchEntry.ID); }
public Guid? CreateOrRecreateWorkListEntry (List<String> IDsToCreateOrRecreate, ref CommonSearchClass SelectedEntry) { Guid? FirstProcessed = null; foreach (String Entry in IDsToCreateOrRecreate) { if (FirstProcessed == null) FirstProcessed = Guid.Parse (Entry); CreateOrRecreateWorkListEntry (Guid.Parse (Entry), ref SelectedEntry); } return FirstProcessed; }
public DataCollection<String[]> LoadPicturesAsStandBildTVEntry(CommonSearchClass SearchRoot) { DataCollection<String[]> FramedMaterial = new DataCollection<String[]>(); FramedMaterial.AddRange(StandBildLinks(SearchRoot.TableName, SearchRoot.ID.ToString( ))); return FramedMaterial; }
public void DoModifyWorkListEntry(CommonSearchClass CSC, Informationen ActivInfo, Guid? InfoID) { UpdateDataModellInstance.UpdateFunction = RequiredUpdateFunction.Modify; }
public void FillMeAsPresseEntry(CommonSearchClass SearchRoot) { SetFramedZielGruppenDaten(SearchRoot); SetFramedPresseKommunikationsDaten(SearchRoot); FillDescriptionalPresseData(SearchRoot); LoadConnectedPictures(SearchRoot); }
public void FillMeAsExternesProgrammEntry(CommonSearchClass SearchRoot) { SetFramedZielGruppenDaten(SearchRoot); SetFramedVideoKommunikationsDaten(SearchRoot); FillDescriptionalExternesProgrammData(SearchRoot); LoadConnectedPictures(SearchRoot); }
private void FillDescriptionalExternesProgrammData(CommonSearchClass SearchRoot) { String BeitragID = SearchRoot.ID.ToString(); VideoDataSet = WMB.DataWrapper.Instance.GetAllVideoDaten(BeitragID); DataRow BeitraegeRow = VideoDataSet.Tables["Beitraege"].Rows[0]; EntryGroupPresentationModel Group = new EntryGroupPresentationModel() { HeadLine = BeitraegeRow["Name"].ToString(), TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.ExternesProgramm }; DescriptionalContent[EntryGroupPresentationModel.GroupTyp.ExternesProgramm] = Group; Group.Items.Add(new EntryItemPresentationModel() { NameID = "Typ", Content = "StandBildSerie" }); InsertDataForOneRow(BeitraegeRow, Group); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Zuordnung", Content = GetStringFromTableValues(VideoDataSet.Tables["GetZuordnungenVonBeitrag"], "Name") }); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Autor", Content = GetStringFromTableValues(VideoDataSet.Tables["GetAutorVonBeitrag"], "Name") }); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Timings", Content = GetTimingsDisplayString(VideoDataSet.Tables["Timings"]) }); Group.Items.Add(new EntryItemPresentationModel() { NameID = "SendeZeiten", Content = GetBlockTimingsForSendung(VideoDataSet.Tables["BeitraegezuSendernZugeordnet"]) }); }
private void FillDescriptionalStandBildTVData(CommonSearchClass SearchRoot) { String TableName = SearchRoot.TableName; String BeitragID = SearchRoot.ID.ToString(); StandBildTVDataSet = WMB.DataWrapper.Instance.GetAllStandBildTVDaten(TableName, BeitragID); DataRow StandBildRow = StandBildTVDataSet.Tables[TableName].Rows[0]; EntryGroupPresentationModel Group = new EntryGroupPresentationModel() { HeadLine = StandBildRow["NameID"].ToString(), TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.StandBildTV }; DescriptionalContent[EntryGroupPresentationModel.GroupTyp.ExternesProgramm] = Group; Group.Items.Add(new EntryItemPresentationModel() { NameID = "Typ", Content = SearchRoot.TableName.ToString() + " (StandBild) Eintrag" }); InsertDataForOneRow(StandBildRow, Group, new string[] {"NameID", "ModifyTimeStamp;Letzte (Tabellen-)Änderung"}); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Änderung gefunden in", Content = Path.GetFileName(Path.GetDirectoryName(SearchRoot.FileFoundInDirectory.ToString())) }); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Zuletzt geändert", Content = SearchRoot.ModifyTimeStamp.ToString() }); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Timings", Content = GetTimingsDisplayString(StandBildTVDataSet.Tables["Timings"]) }); }
private void FillDescriptionalPresseData(CommonSearchClass SearchRoot) { String SubPathName = Path.Combine(SearchRoot.TableName, SearchRoot.NameID); String PictureFileName = Path.Combine(WMB.Basics.FileLocationsForPressMaterial, SubPathName); EntryGroupPresentationModel Group = new EntryGroupPresentationModel() { HeadLine = Path.GetFileNameWithoutExtension(SubPathName), TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.Presse }; DescriptionalContent[EntryGroupPresentationModel.GroupTyp.Presse] = Group; Group.Items.Add(new EntryItemPresentationModel() { NameID = "Typ", Content = "Bild Archiv" }); if (File.Exists(PictureFileName) == false) { Group.Items.Add(new EntryItemPresentationModel() { NameID = "Fehler", Content = "Der File (\"" + PictureFileName + "\") konnte nicht gefunden werden" }); return; } FileInfo FInfo = new FileInfo(PictureFileName); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Im Bereich ", Content = Path.GetDirectoryName(SubPathName) }); Group.Items.Add(new EntryItemPresentationModel() { NameID = "Zuletzt geändert: ", Content = FInfo.LastWriteTime.ToString(WMB.Basics.ISO_DATE_TIME_FORMAT) }); }
private EntryGroupPresentationModel FillDescriptionalInformationData(CommonSearchClass SearchRoot) { EntryGroupPresentationModel Group = new EntryGroupPresentationModel() { HeadLine = SearchRoot.Titel, TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.Information }; foreach (InformationenAddOn InfoAddOn in SearchRoot.InformationenConnectedEntry.ConnectedInformationenAddOn) { Group.Items.Add(new EntryItemPresentationModel() { NameID = InfoAddOn.ActuallBezeichner, Content = InfoAddOn.FreiText }); } DescriptionalContent [EntryGroupPresentationModel.GroupTyp.Information] = Group; return Group; }
public void FillMeAsInformationEntry(CommonSearchClass SearchRoot) { SearchRoot.InformationenConnectedEntry = DataModell.GetInformationen(SearchRoot.ID, true, true); Titel = SearchRoot.InformationenConnectedEntry.Titel; SubTyp = SearchRoot.InformationenConnectedEntry.TypName; SetFramedZielGruppenDaten(SearchRoot, SearchRoot.InformationenConnectedEntry.GetZielGruppen()); SetFramedVideoKommunikationsDaten(SearchRoot, SearchRoot.InformationenConnectedEntry.GetKommunikationsDaten()); FillDescriptionalInformationData(SearchRoot); LastUpdateTime = (DateTime)SearchRoot.InformationenConnectedEntry.ModifyTimeStamp; // FramedMaterialDaten = FullInfo.CreateConnectedMaterialThumbs(); }
public DataCollection<String[]> LoadPicturesAsInformationEntry(CommonSearchClass SearchRoot) { DataCollection<String[]> FramedMaterial = new DataCollection<String[]>(); if (MaterialData == null) return FramedMaterial; foreach (DataRow InformationenAddOnRow in MaterialData.Tables["InformationenAddOn"].Rows) { DataRow TableRow = GetMaterialTableRow(InformationenAddOnRow); if (InformationenAddOnRow["ActuallBezeichner"].ToString().IndexOf("MultiMedia") != -1) { if ((TableRow["TableID"] == Convert.DBNull) || (((Guid) TableRow["TableID"]) == Guid.Empty)) continue; FramedMaterial.AddRange(StandBildLinks(TableRow["TableName"].ToString(), Convert.ToString(TableRow["TableID"]))); } } return FramedMaterial; }
public void FillMeAsStandBildTVEntry(CommonSearchClass SearchRoot) { StringID = WMB.DataWrapper.Instance.GetConnectedInformationenID (SearchRoot.ID.ToString(), SearchRoot.TableName, SearchRoot.NameID); if (String.IsNullOrEmpty(StringID)) { Titel = "Zu diesem StandBild Eintrag \"" + SearchRoot.NameID + "\" gibt es keinen Informations Eintrag"; return; } FillMeAsInformationEntry(SearchRoot); }
public DataCollection<String[]> LoadPicturesAsPresseEntry(CommonSearchClass SearchRoot) { DataCollection<String[]> FramedMaterial = new DataCollection<String[]>(); String SubDirectoryName = Path.Combine(SearchRoot.TableName, SearchRoot.NameID); String PictureFileName = Path.Combine(WMB.Basics.FileLocationsForPressMaterial, SubDirectoryName); if (File.Exists(PictureFileName) == false) return FramedMaterial; String ThumbPictureFileName = Path.Combine(Path.GetDirectoryName(PictureFileName), "Small_" + Path.GetFileName(PictureFileName)); if (!File.Exists(ThumbPictureFileName)) { WMB.Basics.CheckIfAllPicturesHasSmallSiblings(Path.GetDirectoryName(PictureFileName), 1); if (File.Exists(ThumbPictureFileName) == false) throw new Exception("Thumbnail Creation Error"); } String[] PressePictureEntries = new String[] { "Presse", ThumbPictureFileName, PictureFileName, WMB.DataWrapper.Instance.GetPictureDataFromFileName(ThumbPictureFileName, new System.Windows.Size(200, 100)) }; FramedMaterial.Add(PressePictureEntries); return FramedMaterial; }
public EntryPresentationModel(CommonSearchClass SearchEntry) { RootSearchClassEntry = SearchEntry; FillMeFromBeitragBeschreibung(RootSearchClassEntry); }
public DataCollection<String[]> LoadPicturesAsVideoEntry(CommonSearchClass SearchRoot) { DataCollection<String[]> FramedMaterial = new DataCollection<String[]>(); String BildPixel = VideoDataSet.Tables["Beitraege"].Rows[0]["BildPixel"].ToString(); if (String.IsNullOrEmpty(BildPixel)) return FramedMaterial; FramedMaterial.Add(new String[] { "Video", "Beitraege", SearchRoot.ID.ToString(), "True", WMB.Basics.ConvertBase64ImagBytesToDataString(BildPixel, 200, 100) }); return FramedMaterial; }
public void LoadConnectedPictures(CommonSearchClass SearchRoot) { if (Typ == "Information") { FramedMaterialDaten = LoadPicturesAsInformationEntry(SearchRoot); return; } if (Typ == "Presse") { FramedMaterialDaten = LoadPicturesAsPresseEntry(SearchRoot); return; } if (Typ == "Video") { FramedMaterialDaten = LoadPicturesAsVideoEntry(SearchRoot); return; } if (Typ == "ExternesProgramm") { FramedMaterialDaten = LoadPicturesAsVideoEntry(SearchRoot); return; } if (Typ == "StandBildTV") { FramedMaterialDaten = LoadPicturesAsStandBildTVEntry(SearchRoot); return; } }
public String UpdateWorkDataSet(RequiredUpdateFunction RequiredFunction, ref CommonSearchClass SelectedEntry) { SelectedEntry = null; if (ActiveInformationen == null) { return String.Empty; } if ((RequiredFunction == RequiredUpdateFunction.Modify) || (RequiredFunction == RequiredUpdateFunction.InsertNew)) RemoveRemoveableInformationenAddOn(ActiveInformationen, WorkDataSet); if (RequiredFunction == RequiredUpdateFunction.Delete) DeleteDeleteableInformationen(ActiveInformationen, WorkDataSet); foreach (DataTable Table in WorkDataSet.Tables) { if (Table.TableName.Contains("Full")) Table.AcceptChanges(); } DataSet ToChange = WorkDataSet.GetChanges(); #if DEBUG Basics.TraceDataSetChanges(WorkDataSet, ToChange); #endif String ErrorMessages = String.Empty; if (ToChange != null) { foreach (DataTable Table in ToChange.Tables) { String IDName = "ID"; if (Table.TableName == "Timings") IDName = "TimingsID"; foreach (DataRow ChangedRow in Table.Rows) { if (ChangedRow.RowState == DataRowState.Deleted) continue; String ID = ChangedRow [IDName].ToString (); DataRow Row = WorkDataSet.Tables [Table.TableName] .Select (IDName + " = '" + ID + "'") [0]; UInt64 LastUpdateToken = WMB.Basics.GetLastUpdateToken (Row); bool SetModifyRequested = (Row.RowState == DataRowState.Modified); bool SetAddRequested = ((Row.RowState == DataRowState.Added) || ((LastUpdateToken < (UInt64)100000) && (LastUpdateToken != (UInt64)0))); if ((Table.Columns.Contains ("ModifyTimeStamp")) && (Row.RowState != DataRowState.Deleted)) Row ["ModifyTimeStamp"] = DateTime.Now; if ((Table.Columns.Contains ("LastModifiedBy")) && (Row.RowState != DataRowState.Deleted)) Row ["LastModifiedBy"] = WMB.WPMediaApplicationState.Instance.Properties ["UserName"].ToString ().ToUpper( ); if ((SetAddRequested) && (SetModifyRequested == false)) { Row.AcceptChanges (); Row.SetAdded (); } else { } } } if ((WorkDataSet.Tables ["Informationen"].Rows.Count > 0) && (WorkDataSet.Tables ["Informationen"].Rows [0].RowState != DataRowState.Deleted)) { WorkDataSet.Tables["Informationen"].Rows[0]["ModifyTimeStamp"] = DateTime.Now; WorkDataSet.Tables["Informationen"].Rows[0]["LastModifiedBy"] = WMB.WPMediaApplicationState.Instance.Properties["UserName"].ToString().ToUpper(); } ToChange = WorkDataSet.GetChanges(); } if (ToChange != null) { #if DEBUG Basics.TraceDataSetChanges(ToChange, ToChange); #endif ErrorMessages = BasicAccess.AltErlaaInfoDataBase.SetCommonDataSet(ToChange); } if (String.IsNullOrEmpty(ErrorMessages)) { WorkDataSet.AcceptChanges(); ResetPendingModificationssCounter(); RootDataClassLateDBHandler.ProcessCachedBlobCommands (); if (InformationAndInformationenAddOns != null) InformationAndInformationenAddOns.Clear(); SelectedEntry = CommonSearchClassCacheInstance.RefreshWorkListEntry(ActiveInformationen.ID, RequiredFunction); return String.Empty; } throw new Exception ("Fehler bei UpdateWorkDataSet:\r\n" + ErrorMessages); return ErrorMessages; }
private int GetFramedKommunikationsDaten(CommonSearchClass SearchRoot = null) { if (Typ == "Information") { return SetFramedInformationKommunikationsDaten(SearchRoot); } if (Typ == "Presse") { return SetFramedPresseKommunikationsDaten(SearchRoot, null); } if (Typ == "Video") { return SetFramedVideoKommunikationsDaten(SearchRoot, null); } if (Typ == "ExternesProgramm") { return SetFramedExternesProgrammKommunikationsDaten(SearchRoot, null); } if (Typ == "StandBildTV") { return SetFramedStandBildTVKommunikationsDaten(SearchRoot, null); } return 0; }
public Guid? CreateOrRecreateWorkListEntry(List<Guid> IDsToCreateOrRecreate, ref CommonSearchClass SelectedEntry) { Guid? FirstProcessed = null; foreach (Guid Entry in IDsToCreateOrRecreate) { if (FirstProcessed == null) FirstProcessed = Entry; CreateOrRecreateWorkListEntry(Entry, ref SelectedEntry); } return FirstProcessed; }
private int SetFramedZielGruppenDaten(CommonSearchClass SearchRoot, List<String> ZielGruppenDaten = null) { int NumberOfEntries = 0; if (ZielGruppenDaten != null) { EntryGroupPresentationModel Group = new EntryGroupPresentationModel() { HeadLine = "Zielgruppen", TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.Zielgruppen }; EntryItemPresentationModel Item = new EntryItemPresentationModel(); Group.Items.Add(Item); Item.Content = String.Join("\r\n", ZielGruppenDaten); NumberOfEntries++; return NumberOfEntries; } return 0; }
public Guid? CreateOrRecreateWorkListEntry(Guid GuidIDToRefresh, ref CommonSearchClass SelectedEntry) { if (DataModell.WorkListData == null) return null; CommonSearchClass EntryToProcess = null; foreach (CommonSearchClass Entry in DataModell.WorkListData) if (Entry.ID == GuidIDToRefresh) { EntryToProcess = Entry; break; } if (EntryToProcess == null) return null; Materialien MaterialEntry = null; String InputString = DataModell.GetMaterialContentViaName(EntryToProcess.ID, EntryToProcess.BearbeitungsHinweis, out MaterialEntry); if (String.IsNullOrEmpty (InputString)) { MessageBox.Show ("Für das Refreshen des Eintrages \"" + EntryToProcess.ID.ToString () + "\"\r\nmit dem BearbeitungsHinweis \"" + EntryToProcess.BearbeitungsHinweis + "\"\r\nist kein Input vorhanden"); return null; } Guid? ReCreated = CreateOrRecreateWorkListEntry(EntryToProcess.ID, InputString, EntryToProcess.BearbeitungsHinweis, ref SelectedEntry); return ReCreated; }
private int SetFramedInformationKommunikationsDaten(CommonSearchClass SearchRoot, List<String> KommunikationsDaten = null) { EntryGroupPresentationModel Group = new EntryGroupPresentationModel() { HeadLine = "KommunikationsDaten", TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.Kommunikation }; int NumberOfEntries = 0; foreach (String Entry in KommunikationsDaten) { if (Entry.IndexOf("eMail", StringComparison.CurrentCultureIgnoreCase) != -1) { String[] Elements = Entry.Replace(": ", ";").Split(';'); String NewEntry = "<a href=\"mailto:" + Elements[1].Trim() + "\" target=\"_blank\">" + Elements[1].Trim() + "</a>"; Group.Items.Add(new EntryItemPresentationModel() { Content = "<b>" + Elements[0].Replace("0", "").Replace("1", "") + "</b>" + ": " + NewEntry }); NumberOfEntries++; continue; } else if (Entry.IndexOf("www", StringComparison.CurrentCultureIgnoreCase) != -1) { String[] Elements = Entry.Replace(": ", ";").Split(';'); String NewEntry = "<a href=\"" + Elements[1].Trim() + "\" target=\"_blank\">" + Elements[1].Replace("http://", "").Replace("www.", "").Trim() + "</a>"; Group.Items.Add(new EntryItemPresentationModel() { Content = "<b>" + Elements[0].Replace("0", "").Replace("1", "") + "</b>" + ": " + NewEntry }); NumberOfEntries++; continue; } else { String[] Elements = Entry.Replace(": ", ";").Split(';'); Group.Items.Add(new EntryItemPresentationModel() { Content = "<b>" + Elements[0].Replace("0", "").Replace("1", "") + "</b>" + ": " + Elements[1] }); NumberOfEntries++; continue; } } return NumberOfEntries; }
private void CheckEntryForConnectors(CommonSearchClass EntryToProcess) { if (EntryToProcess == null) return; EntryToProcess.InformationenAddOnConnectionEntries = null; EntryToProcess.ProcessConnectorConnectionEntries = null; CheckEntriesForConnectors(new DataCollection<CommonSearchClass> { EntryToProcess }); }
private int SetFramedStandBildTVKommunikationsDaten(CommonSearchClass SearchRoot, List<String> KommunikationsDaten = null) { EntryGroupPresentationModel Group = new EntryGroupPresentationModel() { HeadLine = "KommunikationsDaten", TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.Kommunikation }; int NumberOfEntries = 0; return NumberOfEntries; }
public Guid DoStandBildDBConversionForAllRelatedConnections(CommonSearchClass Element, String TableTypeToCreate) { ConnectionDataModell ConnectionDataModellInstance = new ConnectionDataModell(); ConnectionDataModellInstance.InformationenID = Element.InformationenConnectedEntry.ID; ConnectionDataModellInstance.DoStandBildDBCOnversionForAllSiblingConnectoren (Element.InformationenConnectedEntry.ID); return Element.InformationenConnectedEntry.ID; }
public static void CorrectWrongTitlesNameIdsAndDateTimes (List<String> InformationenIDs, ref CommonSearchClass SelectedEntry) { return; String DirectoryName = CreateBackUpPictures("KP_2016_01%"); return; foreach (string informationenID in InformationenIDs) { Guid informationenId = Guid.Parse(informationenID); List<String> SelectedStatementsForPreLoad = new List<string>(); if (!Data.DbServer3.AltErlaaInfo.PreLoadAddOnsForOneInformation (informationenId, out SelectedStatementsForPreLoad)) throw new Exception ($"Load nicht möglich bei {informationenId}"); foreach (DbEntities.dbserver3.alterlaainfo.rows.ProcessConnector processConnector in Data.DbServer3.AltErlaaInfo.ProcessConnectoren .Where(sel => sel.InformationenId == informationenId)) { String TableName = processConnector.TableName; Guid TableID = (Guid) processConnector.TableId; if (TableID != Guid.Empty) throw new Exception("xxx"); String TitelToSearchFor = Data.DbServer3.AltErlaaInfo.Informationen.Find(informationenId).Titel; Debug.WriteLine(TitelToSearchFor); Data.DbServer3.AltErlaaInfo.Informationen.Find(informationenId).Titel = TitelToSearchFor.Replace("KP_2016_02", "KP_2016_01"); if (TableName == "KaufParkWerbung") { DbEntities.dbserver3.alterlaainfo.rows.Timing[] ExistingTimings = Data.DbServer3.AltErlaaInfo.Timings.Load_via_ConnectedId(informationenId); foreach (DbEntities.dbserver3.alterlaainfo.rows.Timing existingTiming in ExistingTimings) { Debug.WriteLine($"existing Typ = {existingTiming.TimingTypId}, " + $"TimeA = {existingTiming.TimeA}, " + $"TimeB = {existingTiming.TimeB}"); existingTiming.TimeA = DateTime.Parse("2016-01-01 00:00:00"); existingTiming.TimeB = DateTime.Parse("2016-01-31 23:59:59"); } } Data.DbServer3.AltErlaaInfo.SaveAnabolic(); Data.DbServer3.AltErlaaInfo.AcceptChanges(); } } }