📘
TimeLine E3
  • TimeLine E3 Documentation
  • Framework
    • Introduction
    • DataSet Definition
    • Window Handling Object
      • Input/Output arguments
      • Open
      • BindDataControls
      • Item Changes
      • Item Search
      • MenuItemClicked
      • Print
      • ModuleOpened (BlueArrow)
      • BlueArrowArguments
      • New Row
      • Delete Row
      • Save
      • Transactions
      • Locking [deprecated]
      • Locking (new)
      • Resizing a response window
      • ParaPanel
      • Adding DMS Tab to a Module
    • BusinessObject
    • Controls
      • BindingFormat
      • LookupGrid and SearchDef
      • ComboBox
      • RadioButton
      • Multiline Textbox
      • xTextBoxSearch
      • xFileBrowse [v16+]
      • DxDispoColumn
      • DxProgressColumn
      • DxTemplateColumn
      • Change control caption programmatically
      • TabControl
      • Navigation
      • Enable controls programmatically
      • Enable a MenuItem programmatically
      • Filter search values
      • Jumping to another module
      • Messages, Notifications, Log, Exceptions, Translation
      • LoggerSink [deprecated]
      • Log
      • OpenFile, FolderBrowsing and SaveFile
      • Execute Actions while displaying an Hourglass
      • Using Progress
      • Async methods with progress bar
      • Wizard
      • Customizing controls using xBehaviors
      • TLProperty.AllowInReadOnly [v16+]
    • DataSet Operations
    • Business-related functionality
      • Getting the next primary key
      • Hybrids
      • Enums
      • Get Current User
    • SQL
    • SQL (using named parameters)
    • Advanced SQL
    • Expression Binding
    • Server-side logic & customization [v16+]
      • Service Hoster
      • Starting / stopping hosted services
      • Changes to scheduled jobs!
      • Business Object Proxies
      • Business Object API
    • Colors in Expression Bindings [v15+]
    • Theming
      • Icons
  • TimeLine Developer (TLD)
    • Debugging in TLD
    • Targets
    • Custom Project Rework [v16+]
  • TimeLine-specific LL functions
  • Stunnel proxy
    • Pre-requisites
    • 1. Initial setup
    • 2. Generate the server/web certificates
    • 3.a. Generating client certificates using the CSR flow
    • 3.b. Generate client certificates from the server console
    • 4. Setting up the E3 client connection
    • 5. Setting up the browser certificates
  • Configuration
    • Configuring the WCF timeout
  • Troubleshooting the E3 Bridge
  • [Deprecated]
    • TimeLine WEB - deprecated in v16+
      • Prerequisites for running the WASM modules on the server
      • Prerequisites for developing WASM modules with TLD
      • Creating a small web module with TLD
      • Terminal Configuration
    • Customization Examples - deprecated in v16+
    • Codestore [deprecated]
    • Configuring the scheduled jobs timeout - deprecated in v16+
Powered by GitBook
On this page
  • 1. Add xModule-Control to the new created Tab
  • 2. Initialize and load DMS Control
  1. Framework
  2. Window Handling Object

Adding DMS Tab to a Module

PreviousParaPanelNextBusinessObject

Last updated 4 years ago

1. Add xModule-Control to the new created Tab

XAML Code:

<tl:xDockTabItem Header="DMS" Name="tabDMS" Uid="4352f300-c8a7-430f-a10a-bd291d2a3de6" IsEnabled="False">
    <tl:xGrid Uid="d68e9eec-9a33-4eae-96ab-d8884dae960d">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <tl:xModule Name="xModDMS" Grid.Row="0" Grid.Column="0" ModuleID="modDMS3" IsEnabled="True" />
    </tl:xGrid>
</tl:xDockTabItem>

2. Initialize and load DMS Control

public xModule DmsModule
{
    get
    {
        return this.GetControlByNameAndTyp<xModule>("xModDMS");
    }
}

public IxDmsModule DmsControl
{
    get
    {
        if (DmsModule == null) return null;
        return DmsModule.ModuleWHO as IxDmsModule;
    }
}
public virtual void InitDms()
{            
    if (DmsControl != null)
    {
        DmsControl.Init(hybrid, "proz_charg");
    }
}

For newly created tables or hybrids, the connection between the DMS-tables and the current table will be done by creating a SQL Command for inserting a new record in dms_class, dms_categories, dms_tree and dms_treepos

$START
-- create the new dms class
if not exists (select * from dms_class where id = 'my_dms_class') then
    insert into dms_class("id", "matchcode", "default_category")
    values ('my_dms_class', 'My-Class', null)
endif;

-- create a dms category for the class and set it as default
if not exists (select * from dms_categories where class='my_dms_class') then
    insert into dms_categories (id, class, matchcode, default_arch_type, default_arch_zeitraum)
    values ((select max(id) from dms_categories) + 1, 'my_dms_class', 'Standard', null, null);
    update dms_class set default_category=(select max(id) from dms_categories)
    where id='my_dms_class';
endif;

--create a dms tree for the class
if not exists (select * from dms_tree where ref_hybrid='my_dms_class') then
    insert into dms_tree (nr, "type", ref_hybrid)
    values (((select coalesce( max(nr), 1) from dms_tree) + 1), 1, 'my_dms_class')
endif;

-- create a tree root node for the class as well as a default folder
if not exists(select * from dms_treepos where treenr = (select nr from dms_tree where ref_hybrid = 'my_dms_class') and handle = 0) then
    insert into dms_treepos (treenr, handle, lnode, rnode, "info", dms_class_id, typ)
    values ((select nr from dms_tree where ref_hybrid = 'my_dms_class'),0,1,4,'My-Class','my_dms_class',10);
    insert into dms_treepos (treenr, handle, lnode, rnode, "info", dms_class_id, dms_categories_id, typ)
    values ((select nr from dms_tree where ref_hybrid = 'my_dms_class'),1,2,3,'Standard','my_dms_class',(select default_category from dms_class where "id"= 'my_dms_class'), 20);
endif;

$ENDE

Design Mode