private void _LoadList()
        {
            const int ConstDisplayName            = 0;
            const int ConstProfileStateProduction = 1;
            const int ConstProfileStateShadow     = 2;
            const int ConstChgNumber = 3;

            using (new UpdateHelper(m_TreeList))
            {
                m_Proxy.Clear();

                // Daten holen und prüfen
                ISingleDbObject dbobject = m_MainActivator.DbObject;

                if (dbobject == null)
                {
                    return;
                }

                var runner = Session.Resolve <IStatementRunner>();
                using (IDataReader reader = new CachedDataReader(runner.SqlExecute("SDL-FormAppServerDriverProfile", new List <QueryParameter>()
                {
                    new QueryParameter("UID_ApplicationServer", ValType.String, FormTool.GetValueSafe(dbobject, "UID_ApplicationServer", ""))
                })))
                {
                    while (reader.Read())
                    {
                        ITreeListNode node = m_Proxy.AddNode(reader.GetString(ConstDisplayName), (int)StockImage.DriverProfile);
                        m_Proxy.AddItem(node, reader.GetString(ConstProfileStateProduction));
                        m_Proxy.AddItem(node, reader.GetString(ConstProfileStateShadow));
                        m_Proxy.AddItem(node, reader.GetString(ConstChgNumber));
                    }
                }
            }
        }
        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"));
                }
            }
        }
        private void _LoadProtocols()
        {
            ITreeListProxy proxy = m_TreeListProtocols.Proxy;

            using (new UpdateHelper(m_TreeListProtocols))
            {
                proxy.Clear();

                // Daten holen und prüfen
                ISingleDbObject dbobject = m_MainActivator.DbObject;

                if (dbobject == null)
                {
                    return;
                }

                IColDbObject col = Connection.CreateCol("ADSAccountAppsInfo");
                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 = !FormTool.CanSee(dbobject, "UID_ADSAccount") ? "1=2" :
                                            SqlFormatter.UidComparison("UID_ADSAccount", FormTool.GetValueSafe(dbobject, "UID_ADSAccount", ""));
                col.Prototype.OrderBy = "displayname";
                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);
                    proxy.AddItem(node, elem["Installdate"]);
                    proxy.AddItem(node, elem["deinstalldate"]);
                    proxy.AddItem(node, elem["Revision"]);
                    proxy.AddItem(node, elem.GetDisplayValue("UID_OS"));
                    proxy.AddItem(node, elem.GetDisplayValue("UID_InstallationType"));
                }
            }
        }