/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } // Inaktive dürfen nicht mehr zugeordnet werden string isinactiveclause = string.Format("{0} or {1} in (select {1} from MachineTypeHasDriver where {2})", SqlFormatter.Comparison("IsInActive", false, ValType.Bool), SqlFormatter.FormatColumnname("UID_MachineType", true, ValType.String, FormatterOptions.None), SqlFormatter.UidComparison("UID_Driver", FormTool.GetValueSafe(dbobject, "UID_Driver", ""))); m_MemberRelation1.WhereClause = SqlFormatter.AndRelation( isinactiveclause, string.Format("{0} and ((not {1}) or {2})", SqlFormatter.Comparison("ChgNumber", 0, ValType.Int, CompareOperator.GreaterThan), SqlFormatter.Comparison("netcard", "dummy%", ValType.String, CompareOperator.Like), SqlFormatter.EmptyClause("netcard", ValType.String))); } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Daten prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } if (Connection.GetConfigParm(@"Software\Driver\ShowWithoutProfile") == "1") { m_MemberRelation1.WhereClause = SqlFormatter.OrRelation( SqlFormatter.Comparison("IsPc", true, ValType.Bool), SqlFormatter.Comparison("IsServer", true, ValType.Bool)); } else { m_MemberRelation1.WhereClause = FormTool.CanSee(dbobject, "UID_OS", "UID_Driver") ? string.Format("UID_Hardware IN ( SELECT UID_Hardware from Hardware WHERE {0} and {1} and UID_SDLDomainRD in (select UID_SDLDomainRD from driverprofile WHERE {2} and {3}))", SqlFormatter.OrRelation( SqlFormatter.Comparison("IsPc", true, ValType.Bool), SqlFormatter.Comparison("IsServer", true, ValType.Bool)), SqlFormatter.UidComparison("UID_OS", dbobject["UID_OS"].New), SqlFormatter.UidComparison("UID_Driver", dbobject["UID_Driver"].New), SqlFormatter.Comparison("ChgNumber", 0, ValType.Bool, CompareOperator.GreaterThan)) : "1=2"; } } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator mit der Aktivierung beginnt. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. Das Formular besitzt zu diesem Zeitpunkt die Connection /// und alle davon abhängigen Komponenten (SqlFormatter, Preprocessor-Auswertung, ...) /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { // Aktivierung mit <null> verhindern ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } try { string pkcol = "UID_" + dbobject.Tablename; // TODO Whereklauseln setzen m_MemberRelation1.WhereClause = SqlFormatter.Comparison(pkcol, dbobject[pkcol].New.String, ValType.String, CompareOperator.NotEqual); m_MemberRelation1.RootFilterMemberWhereClause = ""; m_MemberRelation1.RootFilterWhereClause = ""; m_MemberRelation1.RootFilterTableName = ""; switch (dbobject.Tablename.ToLowerInvariant()) { case "aerole": m_MemberRelation1.MNTableName = "AERoleRelatedToAERole"; break; case "department": m_MemberRelation1.MNTableName = "DepartmentRelatedToDepartment"; break; case "locality": m_MemberRelation1.MNTableName = "LocalityRelatedToLocality"; break; case "org": m_MemberRelation1.MNTableName = "OrgRelatedToOrg"; m_MemberRelation1.RootFilterTableName = "OrgRoot"; m_MemberRelation1.RootFilterMemberWhereClause = SqlFormatter.UidComparison("UID_OrgRoot", "%UID_OrgRoot%"); m_MemberRelation1.RootFilterWhereClause = "UID_OrgRoot in (select UID_OrgRoot from Org)"; break; case "profitcenter": m_MemberRelation1.MNTableName = "ProfitCenterRelatedToProf"; break; } m_MemberRelation1.MNBaseColumnName = pkcol; } finally { } }
private void _Load(VI.Controls.Interfaces.ITreeListControl treeList, bool loadApps) { ITreeListProxy proxy = treeList.Proxy; using (new UpdateHelper(treeList)) { proxy.Clear(); // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } IColDbObject col = Connection.CreateCol("MachineAppsInfo"); col.Prototype["displayname"].IsDisplayItem = true; col.Prototype["CurrentlyActive"].IsDisplayItem = true; col.Prototype["Installdate"].IsDisplayItem = true; col.Prototype["deinstalldate"].IsDisplayItem = true; col.Prototype["revision"].IsDisplayItem = true; col.Prototype["UID_OS"].IsDisplayItem = true; col.Prototype["UID_InstallationType"].IsDisplayItem = true; col.Prototype.WhereClause = SqlFormatter.AndRelation(!FormTool.CanSee(dbobject, "UID_HardWare") ? "1=2" : SqlFormatter.UidComparison("UID_Hardware", dbobject["UID_HardWare"].New.String), SqlFormatter.Comparison("AppsNotDriver", loadApps, ValType.Bool)); col.Prototype.OrderBy = "Displayname, Installdate, DeInstallDate"; col.Load(CollectionLoadType.ForeignDisplays); foreach (IColElem elem in col) { ITreeListNode node = proxy.AddNode(elem.GetDisplayValue("displayname"), (int)VI.ImageLibrary.StockImage.ApplicationProfile); ITreeListItemSmall item = proxy.CreateCheckBoxItem(elem.GetValue("CurrentlyActive").Bool); item.Enabled = false; proxy.AddItem(node, item); DateTime date = elem.GetValue("Installdate").Date; item = proxy.AddItem(node, DbVal.IsEmpty(date, ValType.Date) ? "" : date.ToString()); item.Data = date; date = elem.GetValue("deinstalldate").Date; item = proxy.AddItem(node, DbVal.IsEmpty(date, ValType.Date) ? "" : date.ToString()); item.Data = date; item = proxy.AddItem(node, elem["Revision"]); item.Data = elem.GetValue("Revision").Int; proxy.AddItem(node, elem.GetDisplayValue("UID_OS")); proxy.AddItem(node, elem.GetDisplayValue("UID_InstallationType")); } } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } m_TreeComboBoxUIDSectionName.WhereClause = SqlFormatter.Comparison("AppsNotDriver", true, ValType.Bool); }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } string mnbasecolumn = m_MemberRelation1.MNBaseColumnName; // Inaktive dürfen nicht mehr zugeordnet werden string isinactiveclause = SqlFormatter.Comparison("IsInActive", false, ValType.Bool); string osclause = dbobject.Columns.Contains("UID_OS") ? (FormTool.CanSee(dbobject, "UID_OS") ? SqlFormatter.UidComparison("UID_OS", FormTool.GetValueSafe(dbobject, "UID_OS", "")) : "1=2") : ""; if (Connection.GetConfigParm(@"Software\Driver\ShowWithoutProfile") == "1") { m_MemberRelation1.WhereClause = SqlFormatter.AndRelation(isinactiveclause, osclause); } else { m_MemberRelation1.WhereClause = SqlFormatter.AndRelation( isinactiveclause, string.Format("{0} in (select {0} from Driverprofile where {1})", SqlFormatter.FormatColumnname("UID_Driver", true, ValType.String), SqlFormatter.Comparison("ChgNumber", 0, ValType.Int, CompareOperator.GreaterThan)), osclause ); } // and all already assigned ones. m_MemberRelation1.WhereClause = SqlFormatter.OrRelation(m_MemberRelation1.WhereClause, string.Format("UID_Driver in (select UID_Driver from {0} where {1})", m_MemberRelation1.MNTableName, SqlFormatter.Comparison(mnbasecolumn, dbobject[mnbasecolumn].New.String, ValType.String, CompareOperator.Equal, FormatterOptions.None) )); } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Aktivierung mit <null> verhindern if (m_MainActivator.DbObject == null) { return; } m_TreeComboBoxUIDDriver.WhereClause = SqlFormatter.Comparison("IsProfileApplication", true, ValType.Bool); } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } m_TreeComboBoxUIDFirmPartnerVendor.WhereClause = SqlFormatter.Comparison("isvendor", true, ValType.Bool); } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator mit der Aktivierung beginnt. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. Das Formular besitzt zu diesem Zeitpunkt die Connection /// und alle davon abhängigen Komponenten (SqlFormatter, Preprocessor-Auswertung, ...) /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Aktivierung mit <null> verhindern ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } // Inaktive dürfen nicht mehr zugeordnet werden m_MemberRelation1.WhereClause = string.Format("{0} or {1} in (select {2} from {4} where {3})", SqlFormatter.Comparison("IsInActive", false, ValType.Bool), SqlFormatter.FormatColumnname("UID_Application", true, ValType.String, FormatterOptions.None), SqlFormatter.FormatColumnname("UID_ApplicationParent", true, ValType.String, FormatterOptions.None), SqlFormatter.UidComparison("UID_ApplicationChild", FormTool.GetValueSafe(dbobject, "UID_Application", "")), "ApplicationDependsOnApp"); m_MemberRelation2.WhereClause = string.Format("{0} or {1} in (select {2} from {4} where {3})", SqlFormatter.Comparison("IsInActive", false, ValType.Bool), SqlFormatter.FormatColumnname("UID_Application", true, ValType.String, FormatterOptions.None), SqlFormatter.FormatColumnname("UID_ApplicationChild", true, ValType.String, FormatterOptions.None), SqlFormatter.UidComparison("UID_ApplicationParent", FormTool.GetValueSafe(dbobject, "UID_Application", "")), "ApplicationDependsOnApp"); m_MemberRelation3.WhereClause = string.Format("{0} or {1} in (select {2} from {4} where {3})", SqlFormatter.Comparison("IsInActive", false, ValType.Bool), SqlFormatter.FormatColumnname("UID_Driver", true, ValType.String, FormatterOptions.None), SqlFormatter.FormatColumnname("UID_DriverParent", true, ValType.String, FormatterOptions.None), SqlFormatter.UidComparison("UID_ApplicationChild", FormTool.GetValueSafe(dbobject, "UID_Application", "")), "ApplicationDependsOnDriver"); m_MemberRelationApplicationExcludeAppUIDApplication.WhereClause = m_MemberRelationApplicationExcludeDriverUIDApplication.WhereClause = SqlFormatter.Comparison("IsInActive", false, ValType.Bool); } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Aktivierung mit <null> verhindern if (m_MainActivator.DbObject == null) { return; } m_MemberRelation1.WhereClause = SqlFormatter.Comparison("IsApplicationGroup", true, ValType.Bool); m_MemberRelation1.RootFilterMemberWhereClause = string.Format( "UID_ADSContainer in (select UID_ADSContainer from ADSContainer where {0})", SqlFormatter.Comparison("Ident_Domain", "%Ident_Domain%", ValType.String)); m_MemberRelation1.RootFilterWhereClause = SqlFormatter.Comparison("Ident_DomainType", "ADS", ValType.String); } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { // Aktivierung mit <null> verhindern if (m_MainActivator.DbObject == null) { return; } string domaintrustsclause = ActiveDirectory.GetUserOrGroupDomainTrustWhereClause(m_MainActivator.DbObject); m_MemberRelation1.WhereClause = SqlFormatter.AndRelation( domaintrustsclause, string.Format("UID_Person in (select UID_Person from Person where {0} AND {1})", SqlFormatter.Comparison("IsDummyPerson", true, ValType.Bool), SqlFormatter.Comparison("IsTASUser", true, ValType.Bool)) ); m_MemberRelation1.RootFilterMemberWhereClause = SqlFormatter.UidComparison("UID_ADSDomain", "%UID_ADSDomain%"); m_MemberRelation1.RootFilterWhereClause = ActiveDirectory.GetDomainTrustWhereClause(m_MainActivator.DbObject); }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } // Inaktive dürfen nicht mehr zugeordnet werden string isinactiveclause = string.Format("{0} or {1} in (select {1} from MachineHasDriver where {2})", SqlFormatter.Comparison("IsInActive", false, ValType.Bool), SqlFormatter.FormatColumnname("UID_Driver", true, ValType.String), SqlFormatter.UidComparison("UID_Hardware", FormTool.GetValueSafe(dbobject, "UID_Hardware", ""))); if (Connection.GetConfigParm(@"Software\Driver\ShowWithoutProfile") == "1") { m_MemberRelation1.WhereClause = isinactiveclause; } else { m_MemberRelation1.WhereClause = SqlFormatter.AndRelation( isinactiveclause, string.Format("{0} and {1} in (select {1} from driverprofile where {2} AND {3})", SqlFormatter.UidComparison("UID_OS", FormTool.GetValueSafe(dbobject, "UID_OS", "")), SqlFormatter.FormatColumnname("uid_driver", false, ValType.String), SqlFormatter.UidComparison("UID_SDLDomainRD", FormTool.GetValueSafe(dbobject, "UID_SDLDomainRD", "")), SqlFormatter.Comparison("ChgTest", 0, ValType.Int, CompareOperator.GreaterThan))); } } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } // Inaktive dürfen nicht mehr zugeordnet werden string isinactiveclause = string.Format("{0} or {1} in (select {1} from DriverHasLicence where {2})", SqlFormatter.Comparison("IsInActive", false, ValType.Bool), SqlFormatter.FormatColumnname("UID_Driver", true, ValType.String, FormatterOptions.None), SqlFormatter.UidComparison("UID_Licence", FormTool.GetValueSafe(dbobject, "UID_Licence", ""))); m_MemberRelation1.WhereClause = isinactiveclause; } finally { } }
/// <summary> /// Wird aufgerufen, bevor der MainActivator aktiviert wird. /// Hier sollten alle von einem DB-Objekt abhängige Initialisierungen /// durchgeführt werden. /// </summary> private void MainActivator_OnActivating(object sender, System.EventArgs e) { try { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } ISqlFormatter f = dbobject.Connection.SqlFormatter; string statement = string.Format("select UpdateWhereClause from DialogTableGroupRight where {0} and UID_DialogGroup in (select UID_DialogGroup from DialogUserInGroup where UID_DialogUser in (select UID_DialogUser from DialogUser where {1}))", f.AndRelation( f.Comparison("UID_DialogTable", "SDL-T-SDLDomain", ValType.String), f.Comparison("CanEdit", true, ValType.Bool) ), f.Comparison("username", dbobject.Connection.User.Identifier, ValType.String)); SqlExecutor exec = dbobject.Connection.CreateSqlExecutor((byte[])m_MainActivator.Variables[GenericPropertyDictionary.ConnectionPublicKey, null]); IDataReader datareader = null; using (datareader = exec.SqlExecute(statement)) { statement = "select count(*) from SDLDOmain where " + SqlFormatter.UidComparison("UID_SDLDomain", dbobject["UID_SDLDomainRDOwner"].New.String); string wherest = ""; while (datareader.Read()) { string where = datareader.GetString(0).Trim(); if (where == "") { wherest = ""; break; } wherest = wherest.Length == 0 ? string.Format("({0})", where) : string.Format("{0} or ({1})", wherest, where); } if (wherest != "") { statement = statement + string.Format(" and ({0})", wherest); } } object result = exec.SqlExecuteScalar(Connection.Variables.Replace(statement)); if (result != null && Convert.ToInt32(result) > 0) { m_MemberRelation1.WhereClause = string.Format("(UID_SDLDomain in (select UID_SDLDomain from ApplicationServer) or {0}) and not (UID_SDLDomain in (select UID_SDLDomain from ApplicationServer Where {1}))", SqlFormatter.UidComparison("UID_ServerTAS", "", CompareOperator.NotEqual), SqlFormatter.Comparison("IsCentralLibrary", true, ValType.Bool)); m_LblHinweis.Visible = false; } else { m_MemberRelation1.WhereClause = string.Format("{0} = {1}", SqlFormatter.FormatValue(1, ValType.Int), SqlFormatter.FormatValue(2, ValType.Int)); m_LblHinweis.Visible = true; } } finally { } }
/// <summary> /// /// </summary> private void Combo1_OnSelectionChangeCommitted(object sender, System.EventArgs e) { try { m_Combo2.ComboItems.Clear(); if (m_Combo1.SelectedIndex == 2 || m_Combo1.SelectedIndex == 3) { m_Label1.Caption = "SDL_FormMachineTypeCopyToOtherSite_Label1"; m_ColAppServer = Connection.CreateCol("ApplicationServer"); m_ColAppServer.Prototype.WhereClause = !FormTool.CanSee(Connection, "ApplicationServer", "UID_Server", "UID_SDLDomain") ? "1=2" : SqlFormatter.Comparison("IsCentralLibrary", true, ValType.Bool); m_ColAppServer.Prototype.Columns["UID_Server"].IsDisplayItem = true; m_ColAppServer.Prototype.Columns["UID_SDLDomain"].IsDisplayItem = true; m_ColAppServer.Load(); switch (m_ColAppServer.Count) { // korrekt case 1: m_ColDestinationDomain = Connection.CreateCol("SDLDomain"); m_ColDestinationDomain.Prototype.WhereClause = SqlFormatter.UidComparison("UID_SDLDomain", m_ColAppServer[0]["UID_SDLDomain"].ToString(), CompareOperator.NotEqual); m_ColDestinationDomain.Load(); if (m_ColDestinationDomain.Count > 0) { foreach (IColElem elem in m_ColDestinationDomain) { m_Combo2.ComboItems.Add(elem); } // m_Combo2.Enabled = true; } else { FormTool.ShowMessage("SDL_FormMachineTypeCopyToOtherSite_Message_NoDomain"); // m_Combo2.Enabled = false; } break; case 0: FormTool.ShowMessage("SDL_FormMachineTypeCopyToOtherSite_Message_NoAppServer"); // m_Combo2.Enabled = false; break; default: FormTool.ShowMessage("SDL_FormMachineTypeCopyToOtherSite_Message_MoreAppServer"); // m_Combo2.Enabled = false; break; } } else { // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null) { return; } m_Label1.Caption = "SDL_FormApplicationProfileCopyAll_ChildServer"; m_ColAppServer = Connection.CreateCol("ApplicationServer"); m_ColAppServer.Prototype.WhereClause = !FormTool.CanSee(dbobject, "UID_SDLDomain") ? "1=2" : SqlFormatter.AndRelation( SqlFormatter.Comparison("UID_SDLDomain", dbobject["UID_SDLDomain"].New.String, ValType.String), " not " + SqlFormatter.EmptyClause("UID_ParentApplicationServer", ValType.String)); m_ColAppServer.Load(); if (m_ColAppServer.Count > 0) { foreach (IColElem elem in m_ColAppServer) { m_Combo2.ComboItems.Add(elem); } } else { FormTool.ShowMessage("SDL_FormApplicationProfileCopyAll_Message_NoChildServerActionNotPossible"); } } // damit die neue Caption angezeigt wird m_Label1.Invalidate(); } catch (Exception ex) { // Fehler melden VI.FormBase.ExceptionMgr.Instance.HandleException(ex, this, 100); } }
private void LoadData() { using (new VI.FormBase.UpdateHelper(m_TreeList)) { m_TreeList.Nodes.Clear(); // Daten holen und prüfen ISingleDbObject dbobject = m_MainActivator.DbObject; if (dbobject == null || !dbobject.TableDef.CanSee) { return; } IColDbObject col = Connection.CreateCol(m_DataStore.String1); col.Prototype.WhereClause = SqlFormatter.Comparison(m_DataStore.String2, FormTool.GetValueSafe(dbobject, m_DataStore.String2, ""), ValType.String); col.Prototype.Columns["CountLicMacDirectTarget"].IsDisplayItem = true; col.Prototype.Columns["CountLicMacIndirectTarget"].IsDisplayItem = true; col.Prototype.Columns["CountLicUserTarget"].IsDisplayItem = true; col.Prototype.Columns["CountLicMacPossTarget"].IsDisplayItem = true; col.Prototype.Columns["CountLicMacDirectActual"].IsDisplayItem = true; col.Prototype.Columns["CountLicMacDirectActual"].IsDisplayItem = true; col.Prototype.Columns["CountLicMacIndirectActual"].IsDisplayItem = true; col.Prototype.Columns["CountLicUserActual"].IsDisplayItem = true; col.Prototype.Columns["CountLicMacPossActual"].IsDisplayItem = true; col.Prototype.Columns["CountLicMacReal"].IsDisplayItem = true; col.Prototype.Columns["CountLimit"].IsDisplayItem = true; col.Load(); bool canedit = col.Prototype.Columns["CountLimit"].CanEdit; bool[] cansees = new bool[] { col.Prototype.Columns["UID_Licence"].CanSee, col.Prototype.Columns["CountLimit"].CanSee, col.Prototype.Columns["CountLicMacDirectActual"].CanSee, col.Prototype.Columns["CountLicMacDirectTarget"].CanSee, col.Prototype.Columns["CountLicMacIndirectActual"].CanSee, col.Prototype.Columns["CountLicMacIndirectTarget"].CanSee, col.Prototype.Columns["CountLicMacPossActual"].CanSee, col.Prototype.Columns["CountLicMacPossTarget"].CanSee, col.Prototype.Columns["CountLicMacReal"].CanSee, col.Prototype.Columns["CountLicUserActual"].CanSee, col.Prototype.Columns["CountLicUserTarget"].CanSee, }; // und Grid füllen foreach (IColElem elem in col) { ISingleDbObject obj = elem.Create(); ISingleDbObject identfk = obj.GetFK("UID_Licence").Create(); string ident = identfk != null ? identfk["Ident_Licence"].New.String : ""; TreeListNode node = m_TreeList.Nodes.Add(cansees[0] ? ident : "", 0); node.ForeColor = SystemColors.ControlDark; ITreeListItem subitem = canedit ? new TreeListItemTextBox(cansees[1] ? elem["CountLimit"].ToString() : "", 8) : new TreeListItem(cansees[1] ? elem["CountLimit"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = canedit ? SystemColors.ControlText : SystemColors.ControlDark; subitem = new TreeListItem(cansees[2] ? elem["CountLicMacReal"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[3] ? elem["CountLicUserActual"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[4] ? elem["CountLicUserTarget"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[5] ? elem["CountLicMacDirectActual"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[6] ? elem["CountLicMacDirectTarget"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[7] ? elem["CountLicMacIndirectActual"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[8] ? elem["CountLicMacIndirectTarget"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[9] ? elem["CountLicMacPossActual"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; subitem = new TreeListItem(cansees[10] ? elem["CountLicMacPossTarget"].ToString() : ""); node.SubItems.Add(subitem); subitem.ForeColor = SystemColors.ControlDark; node.Tag = obj; } } }