//public DataConversion DataConversionInstance // { // get; // set; // } #region CreateMMUnitsForBeitraege public void CreateMMUnitsForBeitraege() { DataConversion dataConversion = new DataConversion(); dataConversion.DoStartup(); int Counter = 0; BeitraegeConversion beitraegeConversion = new BeitraegeConversion(); Data.DbServer3.WPMedia.PreLoadAllScheduling(DateTime.MinValue); foreach (Beitrag beitrag in Data.DbServer3.WPMedia.Beitraege.Load_Modified_From_To (DateTime.Now.AddYears(-2), DateTime.Now.AddYears(2)) .Where( sel => sel.BeitragsTyp == "Video") .OrderByDescending(ord => ord.ModifyTimeStamp)) { beitraegeConversion.CheckOrReCreateOrModifyFullMMUnitTreeForOneBeitrag(beitrag, null, true); if ((Counter++ % 100) == 0) { Debug.WriteLine($"Counter = {Counter}, ModifyTimeStamp = {beitrag.ModifyTimeStamp}"); } if (Counter == 50) { Data.DbServer3.MultiMedia.SaveAnabolic(new Object()); Data.DbServer3.MultiMedia.AcceptChanges(); break; } } Debug.WriteLine($"insgesamt {Counter} Einträge verarbeitet"); }
public AddOnDataToReProcess(DataConversion parent) { Parent = parent; }
public AddOnDataToReProcess(DataConversion parent, MMUnitTyp mmUnitTypToProcess) { MMUnitTypToProcess = mmUnitTypToProcess; switch (mmUnitTypToProcess.Redaktion) { case "StandBild": CsTableToProcess = Data.DbServer3.WPMediaAddOnData.GetTableByName(MMUnitTypToProcess.TypNameId); break; case "Banner": CsTableToProcess = Data.DbServer3.WPMediaAddOnData.GetTableByName(MMUnitTypToProcess.TypNameId); TitelColumnName = "Text"; break; case "Video": CsTableToProcess = Data.DbServer3.WPMedia.GetTableByName(MMUnitTypToProcess.TypNameId); IdColumnName = "BeitragId"; NameIdColumnName = "Name"; TitelColumnName = "ShortDescription"; break; default: throw new Exception($"Wrong mmUnitTypToProcess.Redaktion {mmUnitTypToProcess.Redaktion}"); } Parent = parent; }
private bool? RunCheck() { DataConversion Converter = new DataConversion(ListOfAddOnDataToReProcessInstance, ListOfLastAddOnDataToReProcessInstance); Converter.LogMessage += Converter_LogMessage; bool? Return = Converter.RunCheck (ListOfAddOnDataToReProcessInstance, StartupTableNames); return Return; }
public bool? RunCheck(ObservableCollection<AddOnDataToReProcess> listOfAddOnDataToReProcessInstance, ObservableCollection<LastAddOnDataToReProcess> listOfLastAddOnDataToReProcessInstance) { if (ListOfAddOnDataToReProcessInstance == null) ListOfAddOnDataToReProcessInstance = new ObservableCollection<AddOnDataToReProcess>(); if (ListOfLastAddOnDataToReProcessInstance == null) ListOfLastAddOnDataToReProcessInstance = new ObservableCollection<LastAddOnDataToReProcess>(); StartupTableNames = new List<string>() {"Load"}; DataConversion Converter = new DataConversion(ListOfAddOnDataToReProcessInstance, ListOfLastAddOnDataToReProcessInstance); Converter.LogMessage += Converter_LogMessage; return Converter.RunCheck (ListOfAddOnDataToReProcessInstance, StartupTableNames); }
public bool? DoStandBildDBCOnversionForAllSiblingConnectoren(Guid InfoToCheckId) { ObservableCollection<AddOnDataToReProcess> ListOfAddOnDataToReProcessInstance = new DataCollection<AddOnDataToReProcess>(); ObservableCollection<LastAddOnDataToReProcess> ListOfLastAddOnDataToReProcessInstance = new DataCollection<LastAddOnDataToReProcess>(); DataConversion DBConverter = new DataConversion(ListOfAddOnDataToReProcessInstance, ListOfLastAddOnDataToReProcessInstance); return DBConverter.ReConvertAllConnectedForeignEntries(InfoToCheckId); }
public StatusCollector(DataConversion parent) { Parent = parent; }