Class GroupedTransactionTransactionsController
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientEntities.dll
Syntax
public class GroupedTransactionTransactionsController : BaseGridRelatedCollectionController<IGroupedTransaction, ITransaction>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<ITransaction>, ICopyGridItemImplementor<ITransaction>, IGrid, IDeleteGridItemImplementor<ITransaction>, ISearchController, IModelViewController
Constructors
GroupedTransactionTransactionsController(IBaseGridRelatedCollection<IGroupedTransaction, ITransaction>)
Declaration
public GroupedTransactionTransactionsController(IBaseGridRelatedCollection<IGroupedTransaction, ITransaction> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGridRelatedCollection<IGroupedTransaction, ITransaction> | view |
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
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
AllowSequencing
Indicates the command to allow selected rows to be moved up/down by the user is included in the InitCommands(IList<ViewCommand>)
The default is true if one of the properties against the type ITransaction is defined as having SequenceStart
Declaration
public override bool AllowSequencing { 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 ITransaction derives from ISetCopier
Declaration
public override bool AllowXMLImportExport { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AutoOpenNewItemInTab
Indicates when creating a new item in the grid that it should automatically be opened in a new tab as well
The default is true if the type ITransaction is an entity that is not a IsStandingDataEntity
Declaration
public override bool AutoOpenNewItemInTab { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AutoSelectFirstRow
Indicates the first row of the results in this grid should automatically be selected by the view when the data is loaded and displayed
The default is false
Declaration
protected override bool AutoSelectFirstRow { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
CollectionRelationshipColumnName
This is the property on the ITransaction 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
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
OnlyExportGrid
Indicates when performing a stadard data export that the data should only be exported from the grid itself, and not re-run any query
The default is false
Declaration
public override bool OnlyExportGrid { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
UpdateSubViewsWhenMultipleRowSelectionChanges
Normally sub views are updated when the selection changes. If multiple rows are selected the single item passed to sub views can be the same in which case by default they will not be refreshed. Setting this to true will mean sub views are always refreshed when multiple rows are selected
Declaration
protected override bool UpdateSubViewsWhenMultipleRowSelectionChanges { get; }
Property Value
Type | Description |
---|---|
bool |
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
CanDelete(ITransaction)
Indicates a transaction can be deleted if it is not API.Core.TransactionStatus.Finalized or API.Core.TransactionStatus.Cancelled
Declaration
public override Task<bool> CanDelete(ITransaction item)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | item | The transaction item to see if it can be deleted |
Returns
Type | Description |
---|---|
Task<bool> | True if a transaction can be deleted and is not API.Core.TransactionStatus.Finalized or API.Core.TransactionStatus.Cancelled |
Overrides
CanEditRowItem(ITransaction)
Indicates if the user is permitted to edit the specified row item from the state of the item itself
Declaration
public override bool CanEditRowItem(ITransaction item)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | item | The item to check if the user is permitted to edit |
Returns
Type | Description |
---|---|
bool | True if the user is permitted to edit the specified row item from the state of the item itself |
Overrides
CanEditRowItem(ITransaction, short)
Indicates if the user is permitted to edit the specified column for the specified row item
Declaration
public override bool CanEditRowItem(ITransaction item, short columnDefinitionIndex)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | item | The item to check if the user is permitted to edit |
short | columnDefinitionIndex |
Returns
Type | Description |
---|---|
bool | True if the user is permitted to edit the specified row item from the state of the item itself |
Overrides
ColumnNames()
A list of all the columns to be dynamically created in the IBaseGrid<T>
This is used by the system to create the actual ControlDisplayInfo classes required from the Columns() property
You can override this to provide a simple definition of each column (combined with AlterControlInfo(ControlDisplayInfo) for more detail), or you can just override Columns() and ignore thisDeclaration
protected override IEnumerable<ControlDisplayInfoLight> ColumnNames()
Returns
Type | Description |
---|---|
IEnumerable<ControlDisplayInfoLight> | A list of all the columns to be dynamically created in the IBaseGrid<T> |
Overrides
DeleteCommandIsQuickAccess()
Declaration
public override bool DeleteCommandIsQuickAccess()
Returns
Type | Description |
---|---|
bool |
Overrides
DisplayUI()
Initializes the grid, and creates every ControlDisplayInfo in the defined Columns() and creates them on the grid
Then loads the data for the grid accounting for all view sorting, filtering, searching and paging, and loads the results into the grid as an observable collection
Declaration
public override Task DisplayUI()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
GetDownCommand()
Returns the command for moving an item down in the grid
Declaration
protected override ViewCommand GetDownCommand()
Returns
Type | Description |
---|---|
ViewCommand | The command for moving an item down in the grid |
Overrides
GetGridSourceItems()
Executes the query (GetCurrentQuery()) for the entities required in this grid, sets the total count (as it is different due to paging), and returns the results
Declaration
public override Task<IEnumerable<ITransaction>> GetGridSourceItems()
Returns
Type | Description |
---|---|
Task<IEnumerable<ITransaction>> | The result of executing the GetCurrentQuery() to return all the entities that should be displayed in this grid |
Overrides
GetGridSourceItems(IEnumerable<ITransaction>, QueryableExecuterApplyType)
Returns the currentItems
with the AlterQuery(QueryableExecuter<T>) filtering
applied to the results
Declaration
public override IEnumerable<ITransaction> GetGridSourceItems(IEnumerable<ITransaction> currentItems, QueryableExecuterApplyType typeToApply = QueryableExecuterApplyType.All)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ITransaction> | currentItems | The current items to be displayed in the grid |
QueryableExecuterApplyType | typeToApply |
Returns
Type | Description |
---|---|
IEnumerable<ITransaction> | The |
Overrides
GetNewItemTranInfo(ITransaction)
Declaration
protected (TransactionStatus Status, DateTimeOffset TransactionDate) GetNewItemTranInfo(ITransaction item)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | item |
Returns
Type | Description |
---|---|
(TransactionStatus Status, DateTimeOffset TransactionDate) |
GetUpCommand()
Returns the command for moving an item up in the grid
Declaration
protected override ViewCommand GetUpCommand()
Returns
Type | Description |
---|---|
ViewCommand | The command for moving an item up in the grid |
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 ViewAllocation and TransactionSettingsEdit commands to the standard grid commands
Declaration
protected override void InitCommands(IList<ViewCommand> commands)
Parameters
Type | Name | Description |
---|---|---|
IList<ViewCommand> | commands | The commands for this transaction grid |
Overrides
MoveItemSequence(object, object)
Declaration
public override void MoveItemSequence(object fromItem, object toItem)
Parameters
Type | Name | Description |
---|---|---|
object | fromItem | |
object | toItem |
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 |
---|---|---|
IEnumerable<ITransaction> | items | The transactions to be removed |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
UpdateNewItem(ITransaction)
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(ITransaction item)
Parameters
Type | Name | Description |
---|---|---|
ITransaction | item | The new item created for this grid |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |