Esempio n. 1
0
        private void InsertDataFromOneEntry(DataRow Row, EntryGroupPresentationModel Group,
            String[] ShowOnlyThisItems = null)
            {
            if (Row == null)
                return;

            if (ShowOnlyThisItems != null)
                {
                foreach (String ItemEntry in ShowOnlyThisItems)
                    {
                    String[] ItemEntryElements = ItemEntry.Split(';');
                    String NameID = ItemEntryElements[0];
                    String DisplayableItemName = NameID;
                    if (ItemEntryElements.Length > 1)
                        DisplayableItemName = ItemEntryElements[1];
                    String Content = Row[NameID].ToString().Replace("\r\n", "<br/>");
                    Group.Items.Add(new EntryItemPresentationModel()
                        {
                        NameID = DisplayableItemName,
                        Content = Row[NameID].ToString().Replace("\r\n", "<br/>"),
                        ShowItemNameIndicator = true
                        });
                    }
                return;
                }

            foreach (DataColumn c in Row.Table.Columns)
                {
                if (c.ColumnName.IndexOf("Id") != -1)
                    continue;
                String Content = Row[c.ColumnName].ToString().Replace("\r\n", "<br/>");
                if (String.IsNullOrEmpty(Content))
                    continue;
                if (SkipMe(c.ColumnName))
                    continue;
                bool ContentIsHeadLineIndicator = ContentIsHeadLine(c.ColumnName);
                String DisplayableItemName = ChangeItemName(c.ColumnName);
                Group.Items.Add(new EntryItemPresentationModel()
                    {
                    NameID = DisplayableItemName,
                    Content = Row[c.ColumnName].ToString(),
                    ShowItemNameIndicator = ShowItemName(c.ColumnName)
                    });
                }
            }
Esempio n. 2
0
        private void FillDescriptionalExternesProgrammData(Information SearchRoot)
            {
			List<Guid> ExtProgrammIds = new List<Guid>();
			foreach (ProcessConnector processConnector in Data.DbServer3.AltErlaaInfo.ProcessConnectoren
						.Where(sel => sel.InformationenId == SearchRoot.Id
								&& sel.Redaktion == "Programm"
								&& sel.TableId != null))
				{
				ExtProgrammIds.Add(processConnector.TableId.Value);
				}
			Guid BeitragID = ExtProgrammIds.FirstOrDefault();
	        List<String> SelectedStatementsForPreload;

			Data.DbServer3.WPMedia.PreLoadAllForOneBeitrag(BeitragID, out SelectedStatementsForPreload);
			//VideoDataSet = WMB.DataWrapper.Instance.GetAllVideoDaten(BeitragID.ToString( ));
            //DataRow BeitraegeRow = VideoDataSet.Tables["Beitraege"].Rows[0];
	        Beitrag beitrag = Data.DbServer3.WPMedia.Beitraege.Find(BeitragID);
            MainGroupEntry = new EntryGroupPresentationModel()
                {
                HeadLine = beitrag.Name,
                TypeOfThisGroup = DbBasics.GroupTyp.ExternesProgramm
                };
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Typ",
                Content = "StandBildSerie"
                });
            InsertDataFromOneEntry(beitrag, MainGroupEntry);
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Zuordnung",
                Content = String.Join("\r\n", beitrag.GetZuordnungenVonBeitrag())
				});
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Autor",
                Content = beitrag.Autor.Name
                });
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Timings",
                Content = Data.DbServer3.MultiMedia.MMUnits.FindOrLoad(beitrag.BeitragId).DescriptionalMMUnitTimingsDataString
				});
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "SendeZeiten",
				Content="Not Implement Up To Now"
//ToDo                Content = GetSendeZeitenDisplayString(VideoDataSet.Tables["BeitraegezuSendernZugeordnet"])
                });
            }
Esempio n. 3
0
        private void InsertDataForOneClass(Object TableClass, EntryGroupPresentationModel Group,
            String[] ShowOnlyThisItems = null)
            {
            if (TableClass == null)
                return;
            Type TableClassType = TableClass.GetType();
            List<String> ItemList = new List<string>();
            List<String> ValueList = new List<string>();
            String IDItemName = String.Empty;
            String IDValue = String.Empty;
            WMB.Basics.CreateItemLists(TableClass, TableClassType.GetProperties(), ItemList, ValueList,
                ref IDItemName, ref IDValue, false, false);
            if (ShowOnlyThisItems != null)
                {
                foreach (String ItemEntry in ShowOnlyThisItems)
                    {
                    String[] ItemEntryElements = ItemEntry.Split(';');
                    String NameID = ItemEntryElements[0];
                    String DisplayableItemName = NameID;
                    if (ItemEntryElements.Length > 1)
                        DisplayableItemName = ItemEntryElements[1];
                    int ItemIndex = ItemList.IndexOf(NameID);
                    if (ItemIndex == -1)
                        continue;
                    Group.Items.Add(new EntryItemPresentationModel()
                        {
                        NameID = DisplayableItemName,
                        Content = ValueList[ItemIndex].Replace("\r\n", "<br/>"),
                        ShowItemNameIndicator = true
                        });
                    }
                return;
                }

            int Index = -1;
            while (++Index < ItemList.Count)
                {
                if ((ItemList[Index].IndexOf("ID") == 0)
                    || (ItemList[Index].IndexOf("ID") == ItemList[Index].Length - 2))
                    continue;
                if (ValueList[Index] == null)
                    continue;
                String Content = ValueList[Index].Replace("\r\n", "<br/>");
                if (String.IsNullOrEmpty(Content))
                    continue;
                if (SkipMe(ItemList[Index]))
                    continue;
                bool ContentIsHeadLineIndicator = ContentIsHeadLine(ItemList[Index]);
                String DisplayableItemName = ChangeItemName(ItemList[Index]);
                Group.Items.Add(new EntryItemPresentationModel()
                    {
                    NameID = DisplayableItemName,
                    Content = Content,
                    ShowItemNameIndicator = ShowItemName(ItemList[Index])
                    });
                }
            }
Esempio n. 4
0
        private void FillDescriptionalPresseData(Information SearchRoot)
            {
			//TODO
	        String SubPathName = String.Empty;	//Path.Combine(SearchRoot.TableName, SearchRoot.NameID);
            String PictureFileName = Path.Combine(WMB.Basics.FileLocationsForPressMaterial, SubPathName);
            MainGroupEntry = new EntryGroupPresentationModel()
                {
                HeadLine = Path.GetFileNameWithoutExtension(SubPathName),
                TypeOfThisGroup = DbBasics.GroupTyp.Presse
                };
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Typ",
                Content = "Bild Archiv"
                });
            if (File.Exists(PictureFileName) == false)
                {
                MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                    {
                    NameID = "Fehler",
                    Content = "Der File (\"" + PictureFileName + "\") konnte nicht gefunden werden"
                    });
                return;
                }
            FileInfo FInfo = new FileInfo(PictureFileName);
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Im Bereich ",
                Content = Path.GetDirectoryName(SubPathName)
                });
            MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Zuletzt geändert: ",
                Content = FInfo.LastWriteTime.ToString(WMB.Basics.ISO_DATE_TIME_FORMAT)
                });
            }
Esempio n. 5
0
        private void FillDescriptionalVideoData(Information SearchRoot)
            {
			List<Guid> VideoBeitragIds = new List<Guid>();
	        foreach (ProcessConnector processConnector in Data.DbServer3.AltErlaaInfo.ProcessConnectoren
						.Where(sel => sel.InformationenId == SearchRoot.Id
								&& sel.Redaktion == "Video"
								&& sel.TableName == "Beitraege"
								&& sel.TableId != null))
		        {
		        VideoBeitragIds.Add(processConnector.TableId.Value);
		        }
	        foreach (Guid videoBeitragId in VideoBeitragIds)
		        {
		        List<String> SelectedStatementsForPreLoad = null;
		        Data.DbServer3.WPMedia.PreLoadAllForOneBeitrag
					(videoBeitragId, out SelectedStatementsForPreLoad);
				MainGroupEntry = new EntryGroupPresentationModel()
					{
					HeadLine = Data.DbServer3.WPMedia.Beitraege.Find(videoBeitragId).Name,
					TypeOfThisGroup = DbBasics.GroupTyp.Video
					};
				InsertDataFromOneEntry((DataRow)Data.DbServer3.WPMedia.Beitraege
								.Find(videoBeitragId), MainGroupEntry);
				MainGroupEntry.Items.Add(new EntryItemPresentationModel()
					{
					NameID = "Zuordnung",
					Content = String.Join(", ", Data.DbServer3.WPMedia.Beitraege
								.Find(videoBeitragId).GetZuordnungenVonBeitrag ())
					});
				MainGroupEntry.Items.Add(new EntryItemPresentationModel()
					{
					NameID = "Autor",
					Content = Data.DbServer3.WPMedia.Beitraege
								.Find(videoBeitragId).GetAutorVonBeitrag()
					});
				MainGroupEntry.Items.Add(new EntryItemPresentationModel()
					{
					NameID = "Timings",
					Content = GetTimingsDisplayString(Data.DbServer3.MultiMedia
							.MMUnitTimings.FindOrLoad_By_MMUnitId((Guid) videoBeitragId).ToArray())
					});
				MainGroupEntry.Items.Add(new EntryItemPresentationModel()
					{
					NameID = "SendeZeiten",
					Content = GetSendeZeitenDisplayString(Data.DbServer3.WPMedia.Beitraege
								.Find(videoBeitragId))
					});
				}
            }
Esempio n. 6
0
 private int SetFramedStandBildTVKommunikationsDaten(Information information)
     {
     EntryGroupPresentationModel Group = new EntryGroupPresentationModel()
     {
         HeadLine = "KommunikationsDaten",
         TypeOfThisGroup = DbBasics.GroupTyp.Kommunikation
     };
     int NumberOfEntries = 0;
     return NumberOfEntries;
 }
Esempio n. 7
0
        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"])
                });
            }
Esempio n. 8
0
 private void FillDescriptionalPresseData(DataRow BeitragBeschreibungRow)
     {
     String SubPathName = Path.Combine(BeitragBeschreibungRow["TableName"].ToString(),
         BeitragBeschreibungRow["NameID"].ToString());
     String PictureFileName = Path.Combine(WMB.Basics.FileLocationsForPressMaterial, SubPathName);
     EntryGroupPresentationModel Group = new EntryGroupPresentationModel()
         {
         HeadLine = Path.GetFileNameWithoutExtension(SubPathName)
         };
     DescriptionalContent.Add(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)
         });
     }
Esempio n. 9
0
        private void FillDescriptionalExternesProgrammData(DataRow BeitragBeschreibungRow)
            {
            String BeitragID = BeitragBeschreibungRow["BeitragID"].ToString();
            VideoDataSet = WMB.DataWrapper.Instance.GetAllVideoDaten(BeitragID);
            DataRow BeitraegeRow = VideoDataSet.Tables["Beitraege"].Rows[0];

            EntryGroupPresentationModel BeitragGroup = new EntryGroupPresentationModel()
                {
                HeadLine = BeitraegeRow["Name"].ToString()
                };
            DescriptionalContent.Add(BeitragGroup);
            BeitragGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Typ",
                Content = "StandBildSerie"
                });
            InsertDataForOneRow(BeitraegeRow, BeitragGroup);
            BeitragGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Zuordnung",
                Content = GetStringFromTableValues(VideoDataSet.Tables["GetZuordnungenVonBeitrag"], "Name")
                });
            BeitragGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Autor",
                Content = GetStringFromTableValues(VideoDataSet.Tables["GetAutorVonBeitrag"], "Name")
                });
            BeitragGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Timings",
                Content = GetTimingsDisplayString(VideoDataSet.Tables["Timings"])
                });
            BeitragGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "SendeZeiten",
                Content = GetBlockTimingsForSendung(VideoDataSet.Tables["BeitraegezuSendernZugeordnet"])
                });
            }
Esempio n. 10
0
 private int SetFramedStandBildTVKommunikationsDaten(CommonSearchClass SearchRoot,
     List<String> KommunikationsDaten = null)
     {
     EntryGroupPresentationModel Group = new EntryGroupPresentationModel()
     {
         HeadLine = "KommunikationsDaten",
         TypeOfThisGroup = EntryGroupPresentationModel.GroupTyp.Kommunikation
     };
     int NumberOfEntries = 0;
     return NumberOfEntries;
 }
Esempio n. 11
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);
             }
         }
     }
Esempio n. 12
0
 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;
     
 }
Esempio n. 13
0
 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;
     }
Esempio n. 14
0
        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"])
                });
            }
Esempio n. 15
0
        private int SetFramedZielGruppenDaten(Information information)
            {
            int NumberOfEntries = 0;
			if (information.InformationenZuZielGruppen.Count > 0)
		        {
				EntryGroupPresentationModel Group = new EntryGroupPresentationModel()
					{
					HeadLine = "Zielgruppen",
					TypeOfThisGroup = DbBasics.GroupTyp.Zielgruppen
					};
				DescriptionalContent[DbBasics.GroupTyp.Zielgruppen] = Group;
				EntryItemPresentationModel Item = new EntryItemPresentationModel();
				Group.Items.Add(Item);
				List<String> ZielGruppenDaten = new List<string>();
				foreach (InformationZuZielGruppe informationZuZielGruppe in information.InformationenZuZielGruppen)
					{
					NumberOfEntries++;
					ZielGruppenDaten.Add(informationZuZielGruppe.ZielGruppe.ZielGruppeColumn);
					}
				Item.Content = String.Join("\r\n", ZielGruppenDaten);
				}
            return NumberOfEntries;
            }
Esempio n. 16
0
        private void FillDescriptionalStandBildTVData(DataRow BeitragBeschreibungRow)
            {
            String TableName = BeitragBeschreibungRow["TableName"].ToString();
            String BeitragID = BeitragBeschreibungRow["BeitragID"].ToString();
            StandBildTVDataSet = WMB.DataWrapper.Instance.GetAllStandBildTVDaten(TableName, BeitragID);
            DataRow StandBildRow = StandBildTVDataSet.Tables[TableName].Rows[0];

            EntryGroupPresentationModel StandBildGroup = new EntryGroupPresentationModel()
                {
                HeadLine = StandBildRow["NameID"].ToString()
                };
            DescriptionalContent.Add(StandBildGroup);
            StandBildGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Typ",
                Content = BeitragBeschreibungRow["TableName"].ToString() + " (StandBild) Eintrag"
                });
            InsertDataForOneRow(StandBildRow, StandBildGroup,
                new string[] {"NameID", "ModifyTimeStamp;Letzte (Tabellen-)Änderung"});
            StandBildGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Änderung gefunden in",
                Content =
                Path.GetFileName(Path.GetDirectoryName(BeitragBeschreibungRow["FileFoundInDirectory"].ToString()))
                });
            StandBildGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Zuletzt geändert",
                Content = Convert.ToDateTime(BeitragBeschreibungRow["LastUpdateTimeStamp"]).ToString()
                });
            StandBildGroup.Items.Add(new EntryItemPresentationModel()
                {
                NameID = "Timings",
                Content = GetTimingsDisplayString(StandBildTVDataSet.Tables["Timings"])
                });
            }
Esempio n. 17
0
        private int SetFramedInformationKommunikationsDaten(Information	information)
            {
            EntryGroupPresentationModel Group = new EntryGroupPresentationModel()
                {
                HeadLine = "KommunikationsDaten",
                TypeOfThisGroup = DbBasics.GroupTyp.Kommunikation
                };
            DescriptionalContent[DbBasics.GroupTyp.Kommunikation] = Group;
	        List<String> KommunikationsDaten = information.GetKommunikationsDaten();

			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("@", StringComparison.CurrentCultureIgnoreCase) != -1)
                {
                    String[] Elements = Entry.Replace(": ", ";").Split(';');
                    String NewEntry = "<a href=\"mailto:" + Entry.Trim() + "\" target=\"_blank\">" +
                                      Entry.Trim() + "</a>";
                    Group.Items.Add(new EntryItemPresentationModel()
                    {
                        Content = NewEntry
                    });
                    NumberOfEntries++;
                    continue;
                }

                else if ((Entry.IndexOf("www", StringComparison.CurrentCultureIgnoreCase) != -1)
                    || (Entry.IndexOf(".at", StringComparison.CurrentCultureIgnoreCase) != -1)
                    || (Entry.IndexOf(".de", StringComparison.CurrentCultureIgnoreCase) != -1)
                    || (Entry.IndexOf("http", StringComparison.CurrentCultureIgnoreCase) != -1)
                    || (Entry.IndexOf(".com", StringComparison.CurrentCultureIgnoreCase) != -1))
                    {
                    String NewEntry = "<a href=\"" + Entry.Trim() + "\"  target=\"_blank\">" +
                                      Entry.Replace("http://", "").Replace("www.", "").Trim() + "</a>";
                    Group.Items.Add(new EntryItemPresentationModel()
                        {
                        Content = NewEntry
                        });
                    NumberOfEntries++;
                    continue;
                    }
                else
                    {
                    String[] Elements = Entry.Replace(": ", ";").Split(';');
                    Group.Items.Add(new EntryItemPresentationModel()
                        {
                            Content = ((Elements.Length > 1)) ? "<b>" + Elements[0].Replace("0", "").Replace("1", "") + "</b>" + ": " +
                                      Elements[1] : Elements [0]
                        });
                    NumberOfEntries++;
                    continue;
                    }
                }
            return NumberOfEntries;
        }
Esempio n. 18
0
        private EntryGroupPresentationModel FillDescriptionalInformationData(Information information)
            {
            MainGroupEntry = new EntryGroupPresentationModel()
                {
                HeadLine = information.Titel,
                TypeOfThisGroup = DbBasics.GroupTyp.Information
                };
            foreach (InformationAddOn infoAddOn in information.InformationenAddOnsOrdered)
	            {
	            if (DbBasics.DataDependenciesNotToDisplay[DbBasics.NotToDisplayTypen.InternetSimple]
							.Contains((Guid)infoAddOn.DataDependencyId))
					continue;
                MainGroupEntry.Items.Add(new EntryItemPresentationModel()
                    {
                    NameID = infoAddOn.ActuallBezeichner,
                    Content = infoAddOn.FreiText
                    });
                }
            return MainGroupEntry;
            }
Esempio n. 19
0
		/*
				public DataRow GetTableRow(DataRow InformationenAddOnRow)
					{
					String TableName = InformationenAddOnRow["Tabelle"].ToString();
					String MMPartID = InformationenAddOnRow["TabelleID"].ToString();
					DataTable ContentTable = OldEntryDataSet.Tables[TableName];
					if (ContentTable == null)
						{
						ContentTable = OldEntryDataSet.Tables[TableName + "Full"];
						if (ContentTable == null)
							return null;
						}
					String IDName = GetTableIDName(TableName);
					return ContentTable.Select(IDName + " = '" + MMPartID + "'")[0];
					}

				public DataRow GetMaterialTableRow(DataRow InformationenAddOnRow)
					{
					String TableName = InformationenAddOnRow["Tabelle"].ToString();
					String MMPartID = InformationenAddOnRow["TabelleID"].ToString();
					DataTable ContentTable = OldMaterialDataSet.Tables[TableName];
					if (ContentTable == null)
						{
						ContentTable = OldMaterialDataSet.Tables[TableName + "Full"];
						if (ContentTable == null)
							return null;
						}
					String IDName = GetTableIDName(TableName);
					DataRow[] Rows = ContentTable.Select(IDName + " = '" + MMPartID + "'");
					if (Rows.Length == 0)
						return null;
					return Rows[0];
					}
		*/



		public void SetFramedConnectedDaten (Information SearchRoot)
            {
            EntryGroupPresentationModel AllConnectors = new EntryGroupPresentationModel()
                {
                TypeOfThisGroup = DbBasics.GroupTyp.Connectors,
                HeadLine = "Connected Daten"
                };
            DescriptionalContent[DbBasics.GroupTyp.Connectors] = AllConnectors;
            int ElementIndex = 0;
			Dictionary<String,int> RedaktionenCounter = new Dictionary<string, int>();
            foreach (InformationAddOn informationAddOn  in SearchRoot.InformationenAddOnsOrdered
				.Where(sel => sel.Tabelle == "ProcessConnector"
						&& sel.TabelleId != null
						&& sel.TabelleId != Guid.Empty))
	            {
	            ProcessConnector connector = Data.DbServer3.AltErlaaInfo
						.ProcessConnectoren.Find(informationAddOn.TabelleId);
	            if ((connector.TableId == null)
					|| (connector.TableId == Guid.Empty)
					|| (String.IsNullOrEmpty(connector.Redaktion)))
		            continue;
	            if (!RedaktionenCounter.Keys.Contains(connector.Redaktion))
		            RedaktionenCounter[connector.Redaktion] = 0;
	            int connectionNumber = RedaktionenCounter[connector.Redaktion];
	            RedaktionenCounter[connector.Redaktion]++;

				EntryGroupPresentationModel OneConnector = AllConnectors.GetNewChildEntryGroupPresentationModel
                        (DbBasics.GroupTyp.Connector,
						$"{informationAddOn.ActuallBezeichner} - {DbBasics.ConnectorText[connectionNumber]}");
	            int PageIndex = 0;
                foreach (String [] DataLinesForOnePicture in StandBildLinks((Guid) connector.TableId))
                    { 
                    String PictureName = "BildNummer " + Convert.ToString(++PageIndex);
                    EntryGroupPresentationModel ConnectorForOnePicture 
						= OneConnector.GetNewChildEntryGroupPresentationModel
                        (DbBasics.GroupTyp.ConnectorElement, PictureName);
					ConnectorForOnePicture.Items.Add(new EntryItemPresentationModel()
						{
						Content = connector.Redaktion
						});
					ConnectorForOnePicture.Items.Add(new EntryItemPresentationModel()
						{
						Content = connector.TableName
						});
					ConnectorForOnePicture.Items.Add(new EntryItemPresentationModel()
						{
						Content = DataLinesForOnePicture [0]
						});
					ConnectorForOnePicture.Items.Add(new EntryItemPresentationModel()
						{
						Content = DataLinesForOnePicture[1]
						});
					ConnectorForOnePicture.Items.Add(new EntryItemPresentationModel()
						{
						Content = DataLinesForOnePicture[2]
						});
					ConnectorForOnePicture.Items.Add(new EntryItemPresentationModel()
						{
						Content = DataLinesForOnePicture[3]
						});
					}

				//"Video", "Beitraege", SearchRoot.Id.ToString(), "True",
    //            WMB.Basics.ConvertBase64ImagBytesToDataString(BildPixel, 200, 100)

				}
			}
Esempio n. 20
0
 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;
     }