Class TransactionValuesController
A standard base view that displays the values for a given IsHeaderTransaction
This is responsible for translating the local, func, reporting values into the ITransactionTypeValue values they actually hold according to this header transaction
Each Header transaction can have a number of sub-transactions if the allocated path goes to entities above it that should be included in the allocationThis view is automatically added to a transaction view using the AddDefaultTransactionViews(LayoutDescriptorGroup, LayoutDescriptorGroup)
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views
Assembly: ClientCore.dll
Syntax
public class TransactionValuesController : BaseGridRelatedCollectionController<ITransaction, ITransaction>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<ITransaction>, ICopyGridItemImplementor<ITransaction>, IGrid, IDeleteGridItemImplementor<ITransaction>, ILockableController, IModelViewController
Constructors
TransactionValuesController(IBaseGridRelatedCollection<ITransaction, ITransaction>)
Creates a new TransactionValuesController
Declaration
public TransactionValuesController(IBaseGridRelatedCollection<ITransaction, ITransaction> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGridRelatedCollection<ITransaction, ITransaction> | view | The IBaseGridRelatedCollection view implementation using the UI components of the client application |
Properties
AllowCopyCommand
Declaration
public override bool AllowCopyCommand { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
AllowDeleteCommand
Declaration
public override bool AllowDeleteCommand { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
AllowNewCommand
Declaration
public override bool AllowNewCommand { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
AllowOpenCommand
Declaration
public override bool AllowOpenCommand { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
AllowXMLImportExport
Declaration
public override bool AllowXMLImportExport { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
CanWrite
Uses the ITransactionProcessor CanWrite and Locked to determine if a transaction can be written too
Declaration
public override bool CanWrite { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
CollectionRelationshipColumnName
Declaration
public override string CollectionRelationshipColumnName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ContextHelpURL
Declaration
public override string ContextHelpURL { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
DefaultSearchColumn
Declaration
protected override string DefaultSearchColumn { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
LockableHandler
LockableHandler implementation returning the ITransactionProcessor
Declaration
public ILockable LockableHandler { get; }
Property Value
Type | Description |
---|---|
ILockable |
Methods
AlterQuery(QueryableExecuter<ITransaction>)
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<ITransaction> AlterQuery(QueryableExecuter<ITransaction> query)
Parameters
Type | Name | Description |
---|---|---|
QueryableExecuter<ITransaction> | query | The query to modify to only return the transactions in for this header transaction |
Returns
Type | Description |
---|---|
QueryableExecuter<ITransaction> | The query to return only transactions that have this header transaction as their parent |
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 |
---|---|
System.Collections.Generic.IEnumerable<GridColumnGroup> |
Overrides
Columns()
Adds the standard columns for the transaction value views: EntityID, Reference, and 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 |
---|---|
System.Collections.Generic.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 |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
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 |
---|---|---|
System.Collections.Generic.IEnumerable<ColumnDescriptor> | visibleColumns | The current visible columns in the grid |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ControlDisplayVisibilityInfo>> | A list of columns and their export info |
Overrides
GetGridSourceItems()
Instead of using the query (base implementation) we return all the transactions loaded by the ITransactionProcessor for this header transaction
Declaration
public override Task<IEnumerable<ITransaction>> GetGridSourceItems()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITransaction>> | All the transactions that have this Header Transaction as their parent |
Overrides
InitCommands(IList<ViewCommand>)
Adds the LemonEdge.Client.Core.Views.TransactionValuesController.OpenPath, LemonEdge.Client.Core.Views.TransactionValuesController.AddTypeValue, LemonEdge.Client.Core.Views.TransactionValuesController.DeleteTypeValue, and ToggleNonZeroColumns commands to the standard grid commands
Declaration
protected override void InitCommands(IList<ViewCommand> commands)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<ViewCommand> | commands | The commands for this transaction grid |
Overrides
UpdateLocked()
UpdateLocked() implementation which enumerates each column in the grid and updates their status
Declaration
public void UpdateLocked()