public DataCollection<Object> GetTypList(DataCollection<Object> Typen, Basics.DataSelection PhaseToUseWhenCreateTree) { List<Guid> TypGuidsToShow = null; List<Guid> OrteGuidsToShow = null; List<Guid> ProjekteGuidsToShow = null; CreateDataReductionListsToCreatePhasenAdaptedTrees(PhaseToUseWhenCreateTree, ref ProjekteGuidsToShow, ref OrteGuidsToShow, ref TypGuidsToShow); if (TypGuidsToShow == null) return null; foreach (DataRow TypenRow in WordUpBasics.ProjekteTyp.Values) { if (TypGuidsToShow != null) if (!TypGuidsToShow.Contains((Guid) TypenRow["ID"])) continue; Typ TypClassEntry = new Typ(TypenRow) { HeadLine = TypenRow["TypNameID"].ToString() }; Typen.Add(TypClassEntry); GetProjektList(TypClassEntry.Childrens, TypClassEntry, OrteGuidsToShow, ProjekteGuidsToShow); } return Typen; }
public DataCollection<Object> GetAllTypList(DataCollection<Object> Typen) { foreach (DataRow TypenRow in WordUpBasics.ProjekteTyp.Values) { Typ TypClassEntry = new Typ(TypenRow) { HeadLine = TypenRow["TypNameID"].ToString() }; Typen.Add(TypClassEntry); GetAllProjektList(TypClassEntry.Childrens, TypClassEntry); } return Typen; }
public DataCollection<Object> GetAllProjektList(DataCollection<Object> Projekte, Typ TypEntry) { foreach (DataRow ProjektUebersichtRow in WordUpBasics.AllProjektUebersicht.Values) { if (ProjektUebersichtRow["ProjekteTypID"] == Convert.DBNull) { WMB.Basics.ReportErrorToEventViewer("WordUp.DataWrapper", "Beim Eintrag \"" + ProjektUebersichtRow["ID"].ToString() + "\" (\"" + ProjektUebersichtRow["ProjektBeschreibung"].ToString() + "\") fehlt die Zuweisung zu einem ProjektTyp"); continue; } if ((Guid) ProjektUebersichtRow["ProjekteTypID"] != TypEntry.ID) continue; Projekt ProjektEntry = new Projekt(ProjektUebersichtRow) { HeadLine = ProjektUebersichtRow["ProjektBeschreibung"].ToString(), Wertigkeit = (ProjektUebersichtRow["Wertigkeit"] == Convert.DBNull) ? 0 : Convert.ToInt32(ProjektUebersichtRow["Wertigkeit"]) }; Projekte.Add(ProjektEntry); } return Projekte; }