/// <summary>
        ///
        /// </summary>
        private void MainActivator_OnSaved(object sender, System.EventArgs e)
        {
            try
            {
                foreach (TreeListNode node in m_TreeList.Nodes)
                {
                    if (!node.SubItemsContentChanged)
                    {
                        continue;
                    }

                    ISingleDbObject dbobject = node.Tag as ISingleDbObject;

                    if (FormTool.SetValueSafe(dbobject, "CountLimit", int.Parse(node.SubItems[0].Data as string)))
                    {
                        node.SubItems[0].ForeColor = SystemColors.ControlText;
                    }

                    dbobject.Save();
                    dbobject.Load();
                }
            }
            catch (Exception ex)
            {
                // Fehler melden
                HandleException(ex);
            }
            finally
            {
                m_TreeList.Invalidate();
            }
        }
        /// <summary>
        ///
        /// </summary>
        private void CmdOrderNumber_OnClick(object sender, System.EventArgs e)
        {
            try
            {
                // Daten holen und prüfen
                ISingleDbObject dbobject = m_MainActivator.DbObject;

                if (dbobject == null || !FormTool.CanSee(dbobject, "UID_SDLDomainRD", "UID_Profile", "OrderNumber", "UID_OS"))
                {
                    return;
                }

                using (SortOrderPackDialog dlg = new SortOrderPackDialog(Connection, ProfileType.Application))
                {
                    dlg.UidSDLDomainRD = dbobject["UID_SDLDomainRD"].New.String;
                    dlg.UidProfile     = dbobject["UID_Profile"].New.String;
                    dlg.OrderNumber    = dbobject["OrderNumber"].New.Double;
                    dlg.UidOs          = dbobject["UID_OS"].New.String;

                    if (dlg.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }

                    FormTool.SetValueSafe(dbobject, "OrderNumber", dlg.OrderNumber);
                }
            }
            catch (Exception ex)
            {
                // Fehler melden
                HandleException(ex);
            }
        }
        private void SetUpNewSectionNameObjectAction(ISingleDbObject targetDbObject)
        {
            FormTool.SetValueSafe(targetDbObject, "AppsNotDriver", true);

            var sourceDbObject = m_MainActivator.DbObject;

            if (sourceDbObject == null || Session == null)
            {
                return;
            }

            var prefix       = Session.Config().GetConfigParm(@"Software\Driver\Section\Prefix") ?? "";
            var identDriver  = prefix + FormTool.GetValueSafe(sourceDbObject, "Ident_Driver", "");
            var targetMaxLen = targetDbObject.GetEntity().Columns["Ident_SectionName"].MaxLen;

            if (!string.IsNullOrEmpty(identDriver) && targetMaxLen > 0)
            {
                identDriver = identDriver.Substring(0, Math.Min(targetMaxLen, identDriver.Length)).Trim();
            }

            FormTool.SetValueSafe(targetDbObject, "Ident_SectionName", identDriver);
        }