Class TransactionPivottedValuesController
A standard base view that displays the pivotted 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.Controllers
Assembly: LemonEdge.ClientCore.dll
Syntax
public class TransactionPivottedValuesController : BaseGridRelatedAnyCollectionController<ITransaction, PivotedTransactionValue>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<PivotedTransactionValue>, ICopyGridItemImplementor<PivotedTransactionValue>, IGrid, IDeleteGridItemImplementor<PivotedTransactionValue>, ISearchController, ILockableController, IModelViewController
Constructors
TransactionPivottedValuesController(IBaseGridRelatedCollection<ITransaction, PivotedTransactionValue>)
Creates a new TransactionValuesController
Declaration
public TransactionPivottedValuesController(IBaseGridRelatedCollection<ITransaction, PivotedTransactionValue> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGridRelatedCollection<ITransaction, PivotedTransactionValue> | view | The IBaseGridRelatedCollection view implementation using the UI components of the client application |
Properties
AllowCopyCommand
Indicates the command to allow selected rows to be copied by the user is included in the InitCommands(IList<ViewCommand>)
The default is false
Declaration
public override bool AllowCopyCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowDeleteCommand
Indicates the command to allow selected rows to be deleted by the user is included in the InitCommands(IList<ViewCommand>)
The default is false
Declaration
public override bool AllowDeleteCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowExcelExport
Indicates the command to allow the grid data to be exported by the user is included in the InitCommands(IList<ViewCommand>)
The default is true
Declaration
public override bool AllowExcelExport { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowNewCommand
Indicates the command to allow new items to be created by the user is included in the InitCommands(IList<ViewCommand>)
The default is false if NewItemHelper is equal to null
Declaration
public override bool AllowNewCommand { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
AllowOpenCommand
Indicates the command to allow selected rows to be opened by the user is included in the InitCommands(IList<ViewCommand>)
The default is false
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 PivotedTransactionValue derives from ISetCopier
Declaration
public override bool AllowXMLImportExport { 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
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 |
---|---|
bool |
Overrides
CollectionRelationshipColumnName
This is the property on the PivotedTransactionValue 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
DefaultColumnGroupIndexes
Groupings for columns to be grouped by and items have aggregation summaries of
Declaration
public override IEnumerable<int> DefaultColumnGroupIndexes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<int> |
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
ExpandDefaultGroups
Indicates groups should be expanded by default - false by default
Declaration
public override bool ExpandDefaultGroups { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
ItemRowColorProperty
Indicate the name of the property on the row item that holds a Color to color the row with
Declaration
public override string ItemRowColorProperty { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
LockableHandler
LockableHandler implementation returning the ITransactionProcessor
Declaration
public ILockable LockableHandler { get; }
Property Value
Type | Description |
---|---|
ILockable |
SelectedItemForSubViews
Returns the first selected item in the IBaseGrid<T> for any sub-views
Declaration
public override object SelectedItemForSubViews { get; }
Property Value
Type | Description |
---|---|
object |
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
CanEditRowItem(PivotedTransactionValue)
Indicates if the user is permitted to edit the specified row item from the state of the item itself
Declaration
public override bool CanEditRowItem(PivotedTransactionValue item)
Parameters
Type | Name | Description |
---|---|---|
PivotedTransactionValue | 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(PivotedTransactionValue, short)
Indicates if the user is permitted to edit the specified column for the specified row item
Declaration
public override bool CanEditRowItem(PivotedTransactionValue item, short columnDefinitionIndex)
Parameters
Type | Name | Description |
---|---|---|
PivotedTransactionValue | 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
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
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
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
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
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<PivotedTransactionValue>> GetGridSourceItems()
Returns
Type | Description |
---|---|
Task<IEnumerable<PivotedTransactionValue>> | All the transactions that have this Header Transaction as their parent |
Overrides
GetGridSourceItems(IEnumerable<PivotedTransactionValue>, QueryableExecuterApplyType)
Returns the currentItems
with the AlterQuery(QueryableExecuter<T>) filtering
applied to the results
Declaration
public override IEnumerable<PivotedTransactionValue> GetGridSourceItems(IEnumerable<PivotedTransactionValue> currentItems, QueryableExecuterApplyType typeToApply = QueryableExecuterApplyType.All)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<PivotedTransactionValue> | currentItems | The current items to be displayed in the grid |
QueryableExecuterApplyType | typeToApply |
Returns
Type | Description |
---|---|
IEnumerable<PivotedTransactionValue> | The |
Overrides
GetItemToReselect(object)
Declaration
protected override object GetItemToReselect(object item)
Parameters
Type | Name | Description |
---|---|---|
object | item |
Returns
Type | Description |
---|---|
object |
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
UpdateLocked()
UpdateLocked() implementation which enumerates each column in the grid and updates their status
Declaration
public void UpdateLocked()