Class ModuleDef
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
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
ConnectionName
Gets or sets the connection name (database)
public string ConnectionName { get; set; }
Property Value
Description
An optional description
public string Description { get; set; }
Property Value
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
FactBoxes
FactBox definitions displayed by item pages for this module.
public DefList<ItemFactBoxDef> FactBoxes { get; set; }
Property Value
Group
The group this module belongs to, e.g. Sales, Purchaces, etc.
public string Group { get; set; }
Property Value
GuidOids
When is true indicates that the OID is a Guid string.
public bool GuidOids { get; set; }
Property Value
IsSingleSelect
When true then this is a module with a fixed single select.
public bool IsSingleSelect { get; set; }
Property Value
ItemCaptionField
A field name of a field used in providing the item caption/title.
public string ItemCaptionField { get; set; }
Property Value
SecurityLevel
Gets or sets the minimum user level required to access this module.
public UserLevel SecurityLevel { get; set; }
Property Value
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
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
Table
The top table of the module, the one with the single data row.
public TableDef Table { get; set; }
Property Value
UseFilters
When true, the default, the filter panel in UI forms should be visible.
public bool UseFilters { get; set; }
Property Value
Methods
CanAccess(AppUser)
Returns true when the specified user may access this module.
public bool CanAccess(AppUser User)
Parameters
UserAppUser
Returns
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
InitializeToobool
Returns
GetTables()
Returns all tables in a flat list
public List<TableDef> GetTables()
Returns
UpdateReferences()
Updates references such as when an instance has references to other instances, e.g. tables of a module definition.
public override void UpdateReferences()