Class TransactionHeadersController
A standard base view that displays all the sub transactions of a RootTransactionID.
Sub transactions are allowed when the SubTransactions is set to a value other than None
All sub transactions are still set as IsHeaderTransaction but they all have the same RootTransactionIDThis view is automatically used in the AddDefaultTransactionViews(LayoutDescriptorGroup, LayoutDescriptorGroup)
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views
Assembly: ClientCore.dll
Syntax
public class TransactionHeadersController : BaseGridRelatedCollectionController<ITransaction, ITransaction>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<ITransaction>, ICopyGridItemImplementor<ITransaction>, IGrid, IDeleteGridItemImplementor<ITransaction>, ILockableController, IModelViewController
Constructors
TransactionHeadersController(IBaseGridRelatedCollection<ITransaction, ITransaction>)
Creates a new TransactionHeadersController
Declaration
public TransactionHeadersController(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
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
AutoOpenNewItemInTab
Declaration
public override bool AutoOpenNewItemInTab { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
AutoSelectFirstRow
True - Always select the first transaction
Declaration
protected override bool AutoSelectFirstRow { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
CanCreateNew
Returns true if the SubTransactions is set to Manual
Declaration
public override bool CanCreateNew { 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
AlterColumnInfo(ControlDisplayInfo)
Ensures all the columns have the correct filters depending on the instrument, entity and path selected for the transaction
Declaration
protected override void AlterColumnInfo(ControlDisplayInfo info)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | info | The column to alter |
Overrides
AlterQuery(QueryableExecuter<ITransaction>)
Ensures the query is filtered to only the header transactions that have this transaction as the root transaction
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 parent item |
Returns
Type | Description |
---|---|
QueryableExecuter<ITransaction> | The query to return only transactions that have this transaction as their root transaction |
Overrides
CanDelete(ITransaction)
Returns true if the SubTransactions is set to Manual and the selected transaction is not the root transaction itself
Declaration
public override bool CanDelete(ITransaction item)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | item |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
ColumnNames()
Adds the standard header columns from ColumnNames()
Declaration
protected override IEnumerable<ControlDisplayInfoLight> ColumnNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ControlDisplayInfoLight> | The standard header columns for a grid of header transactions |
Overrides
DisplayUI()
Loads all the related transactions through the ITransactionProcessor for this RootTransaction 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
GetGridSourceItems()
Instead of using the query (base implementation) we return all the HeaderTransactions loaded by the processor
Declaration
public override Task<IEnumerable<ITransaction>> GetGridSourceItems()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITransaction>> | All the header transactions that have this transaction as their root transaction |
Overrides
InitCommands(IList<ViewCommand>)
Adds the ViewAllocation and TransactionSettingsEdit 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
RemoveItems(IEnumerable<ITransaction>)
Removes the specified items from the ITransactionProcessor as well as the base implementation from the grid itself
Declaration
public override Task RemoveItems(IEnumerable<ITransaction> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ITransaction> | items | The transactions to be removed |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |
Overrides
UpdateLocked()
UpdateLocked() implementation which enumerates each column in the grid and updates their status
Declaration
public void UpdateLocked()
UpdateNewItem(ITransaction)
Declaration
protected override Task UpdateNewItem(ITransaction item)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | item |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |