Class TransactionValueAssociationsController
A standard transaction view that displays the associated amount related to entities
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views
Assembly: LemonEdge.ClientEntities.dll
Syntax
public class TransactionValueAssociationsController : BaseGridRelatedCollectionController<ITransaction, ITransactionAssociation>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<ITransactionAssociation>, ICopyGridItemImplementor<ITransactionAssociation>, IGrid, IDeleteGridItemImplementor<ITransactionAssociation>, ISearchController, IModelViewController
Constructors
TransactionValueAssociationsController(IBaseGridRelatedCollection<ITransaction, ITransactionAssociation>)
Creates a new TransactionValueAssociationsController
Declaration
public TransactionValueAssociationsController(IBaseGridRelatedCollection<ITransaction, ITransactionAssociation> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGridRelatedCollection<ITransaction, ITransactionAssociation> | view | The IBaseGridRelatedCollection view implementation using the UI components of the client application |
Properties
AllowCopyCommand
Indicates that by default selected entities can be copied by the user with the copy command
Declaration
public override bool AllowCopyCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowDeleteCommand
Indicates that by default selected entities can be deleted by the user with the delete command
Declaration
public override bool AllowDeleteCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowNewCommand
Indicates that by default entities can be created by the user with the new command
Declaration
public override bool AllowNewCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowOpenCommand
Indicates that by default selected entities can be opened by the user with the open command
Declaration
public override bool AllowOpenCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowXMLImportExport
Indicates the command to allow the xml export of the data by the user is included in the InitCommands(IList<ViewCommand>)
The default is true if the type ITransactionAssociation derives from ISetCopier
Declaration
public override bool AllowXMLImportExport { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
CollectionRelationshipColumnName
This is the property on the ITransactionAssociation entities that holds a relationship value that points to the SingleItem type
This controller will automatically use that to filter the correct entities for the grid in AlterQuery(QueryableExecuter<TCollection>)
Declaration
public override string CollectionRelationshipColumnName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
ContextHelpURL
An optional associated url of a help file for the view this controller works with
Declaration
public override string ContextHelpURL { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
DefaultSearchColumn
The name of the column to use in the default search of text in the grid
Declaration
protected override string DefaultSearchColumn { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
PopulateNewFromLookupColumnName
Returns OpenFromRelatedColumnName
Declaration
public override string PopulateNewFromLookupColumnName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
PopulateNewFromLookupRelationship
If PopulateNewFromLookupColumnName is set this by default returns the relationship to use for the popup for that column, but allows it to be overridden
Declaration
public override EntityRelationship PopulateNewFromLookupRelationship { get; }
Property Value
Type | Description |
---|---|
EntityRelationship |
Overrides
Methods
AlterColumnInfo(ControlDisplayInfo)
Provides an inheriting controller the opportunity to alter the specified column before it is added to the IBaseGrid<T>
This is used in conjunction with columns defined via ColumnNames(), rather than Columns() which explicitly defines all information
The default operation provides a CustomComboItems if the column is against a property that is a link to an entity type (IsEntityLink)Declaration
protected override void AlterColumnInfo(ControlDisplayInfo info)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | info | The definition of the column that can be updated before being created in the IBaseGrid<T> |
Overrides
AlterQuery(QueryableExecuter<ITransactionAssociation>)
Ensures the query is filtered to only the transactions that have this header transactions as their parent
This is not used by the controller, but can be used by the inheriting implementation. This controller overrides the GetGridSourceItems to use the processor loaded transactions instead
Declaration
protected override QueryableExecuter<ITransactionAssociation> AlterQuery(QueryableExecuter<ITransactionAssociation> query)
Parameters
Type | Name | Description |
---|---|---|
QueryableExecuter<ITransactionAssociation> | query | The query to modify to only return the transactions in for this header transaction |
Returns
Type | Description |
---|---|
QueryableExecuter<ITransactionAssociation> | The query to return only transactions that have this header transaction as their parent |
Overrides
Clear()
Clears the paging information for the loaded grid items
Declaration
public override Task Clear()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
ColumnGroups()
Creates groupings for the valus columns - Entity info, then Local, Functional, Reporting values, and finally System for base hidden columns
Declaration
public override IEnumerable<GridColumnGroup> ColumnGroups()
Returns
Type | Description |
---|---|
IEnumerable<GridColumnGroup> |
Overrides
Columns()
Adds the standard columns for the transaction value views: EntityID, IHeaderTransactionalEntity.Reference, and API.Entities.ITransaction.ParentTransactionID
Then for each ITransactionTypeValue in this header transaction the system creates a corrosponding local, functional, reporting named column mapping to the correct value property
Declaration
public override IEnumerable<ControlDisplayInfo> Columns()
Returns
Type | Description |
---|---|
IEnumerable<ControlDisplayInfo> | The columns to be displayed against this grid |
Overrides
DisplayUI()
Loads all the related transactions through the ITransactionProcessor for this HeaderTransaction and populates the grid with all the loaded transactions
GetGridSourceItems is overridden to return the processor transactions instead of loading the transactions from the query
Declaration
public override Task DisplayUI()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
GetCanWrite(object)
Declaration
protected override Task<bool> GetCanWrite(object item)
Parameters
Type | Name | Description |
---|---|---|
object | item |
Returns
Type | Description |
---|---|
Task<bool> |
Overrides
GetExportableColumnInfo(IEnumerable<ColumnDescriptor>)
Overrides the grid exportable column info to include the dynamically created columns that map the ITransactionTypeValue amounts to the appropriate local, func, or reporting value against the transaction
Declaration
public override Task<IEnumerable<ControlDisplayVisibilityInfo>> GetExportableColumnInfo(IEnumerable<ColumnDescriptor> visibleColumns)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ColumnDescriptor> | visibleColumns | The current visible columns in the grid |
Returns
Type | Description |
---|---|
Task<IEnumerable<ControlDisplayVisibilityInfo>> | A list of columns and their export info |
Overrides
InitAsync()
Provides the controller a chance to initialize any dependant data. Called once by the system after controller creation.
Declaration
public override Task InitAsync()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
InitCommands(IList<ViewCommand>)
Adds the following commands, if the associated AllowXXXCommand property returns true: A public toggle, multi-select row, open, column visiblitiy, transfer visible, search, view cancelled, view system, export, new, copy, move up/down, xml export, and delete commands
Declaration
protected override void InitCommands(IList<ViewCommand> commands)
Parameters
Type | Name | Description |
---|---|---|
IList<ViewCommand> | commands | The initial set of commands for this view |
Overrides
UpdateNewItem(ITransactionAssociation)
Updates any new item created in this grid to also have the CollectionRelationshipColumnName property hold the value of the SingleItem ID
Declaration
protected override Task UpdateNewItem(ITransactionAssociation item)
Parameters
Type | Name | Description |
---|---|---|
ITransactionAssociation | item | The new item created for this grid |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |