Table of Contents

Class ModuleDef

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

Describes a DataMode

public class ModuleDef : BaseDef, IDef, IJsonLoadable, INotifyPropertyChanged
Inheritance
ModuleDef
Implements
Inherited Members
Extension Methods

Properties

CascadeDeletes

When true indicates that deletes should happen bottom to top, i.e. starting from the bottom table. When false indicates that deletes should happen top to bottom, so if any database foreign constraint exists, then let an exception to be thrown. Defaults to true.

public bool CascadeDeletes { get; set; }

Property Value

bool

ClassName

The class name of the Type this descriptor describes.

NOTE: The value of this property may be a string returned by the AssemblyQualifiedName property of the type.

In that case, it consists of the type name, including its namespace, followed by a comma, followed by the display name of the assembly the type belongs to. It might looks like the following

Tripous.Data.DataModule, Tripous, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Otherwise it can be a full type name FullName, e.g.

Tripous.Data.DataModule

public string ClassName { get; set; }

Property Value

string

ConnectionName

Gets or sets the connection name (database)

public string ConnectionName { get; set; }

Property Value

string

Description

An optional description

public string Description { get; set; }

Property Value

string

DetailOrder

The preferred display order of direct child detail tables, keyed by parent table name.

public Dictionary<string, List<string>> DetailOrder { get; set; }

Property Value

Dictionary<string, List<string>>

FactBoxes

FactBox definitions displayed by item pages for this module.

public DefList<ItemFactBoxDef> FactBoxes { get; set; }

Property Value

DefList<ItemFactBoxDef>

Group

The group this module belongs to, e.g. Sales, Purchaces, etc.

public string Group { get; set; }

Property Value

string

GuidOids

When is true indicates that the OID is a Guid string.

public bool GuidOids { get; set; }

Property Value

bool

IsSingleSelect

When true then this is a module with a fixed single select.

public bool IsSingleSelect { get; set; }

Property Value

bool

ItemCaptionField

A field name of a field used in providing the item caption/title.

public string ItemCaptionField { get; set; }

Property Value

string

SecurityLevel

Gets or sets the minimum user level required to access this module.

public UserLevel SecurityLevel { get; set; }

Property Value

UserLevel

SelectList

A list of named SELECT Sql statements. Used in the List part and List SELECTs of the module.

public SelectDefs SelectList { get; set; }

Property Value

SelectDefs

Stocks

A list of named SELECT Sql statements that executed once at the initialization of the module and may be used in various situations, i.e. Locators

public SelectDefs Stocks { get; set; }

Property Value

SelectDefs

Table

The top table of the module, the one with the single data row.

public TableDef Table { get; set; }

Property Value

TableDef

UseFilters

When true, the default, the filter panel in UI forms should be visible.

public bool UseFilters { get; set; }

Property Value

bool

Methods

CanAccess(AppUser)

Returns true when the specified user may access this module.

public bool CanAccess(AppUser User)

Parameters

User AppUser

Returns

bool

CheckDescriptor()

Throws an exception if this descriptor is not fully defined

public override void CheckDescriptor()

Create(bool)

Creates, initializes and returns a DataModule associated with this definition.

public DataModule Create(bool InitializeToo = true)

Parameters

InitializeToo bool

Returns

DataModule

GetTables()

Returns all tables in a flat list

public List<TableDef> GetTables()

Returns

List<TableDef>

UpdateReferences()

Updates references such as when an instance has references to other instances, e.g. tables of a module definition.

public override void UpdateReferences()