Class TransactionValuesAllocatedController
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientEntities.dll
Syntax
public class TransactionValuesAllocatedController : BaseGridRelatedCollectionController<ITransaction, ITransactionAllocated>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<ITransactionAllocated>, ICopyGridItemImplementor<ITransactionAllocated>, IGrid, IDeleteGridItemImplementor<ITransactionAllocated>, ISearchController, ILockableController, IModelViewController
Constructors
TransactionValuesAllocatedController(IBaseGridRelatedCollection<ITransaction, ITransactionAllocated>)
Declaration
public TransactionValuesAllocatedController(IBaseGridRelatedCollection<ITransaction, ITransactionAllocated> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGridRelatedCollection<ITransaction, ITransactionAllocated> | 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
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 ITransactionAllocated is an entity that is not a IsStandingDataEntity
Declaration
public override bool AutoOpenNewItemInTab { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
CanCreateNew
Indicates if the user can create new items in the grid
The default implementation is true, allowing specific controller implementations to provide override values
Declaration
public override bool CanCreateNew { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
CanWrite
Indicates if the user currently has permissions to edit the displayed item
Default to false if the main displayed item for this layout has read only set to true ( ReadOnly). Or loads the permissions for the item
Declaration
public override bool CanWrite { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
CollectionRelationshipColumnName
This is the property on the ITransactionAllocated 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
DisplayIfNull
Indicates that even if the item is null the view should still update and display a null value. Default value is false.
Declaration
public override bool DisplayIfNull { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
ItemCellDisableCell
Declaration
public override Func<object, string, string, bool> ItemCellDisableCell { get; }
Property Value
Type | Description |
---|---|
Func<object, string, string, bool> |
Overrides
LockableHandler
The implementation that specified if this view can be edited/locked
Declaration
public ILockable LockableHandler { get; }
Property Value
Type | Description |
---|---|
ILockable |
OnlyExportFromQuery
Indicates when performing a stadard data export that the data should only be exported by re-running a query to fetch the results again
The default is false
Declaration
public override bool OnlyExportFromQuery { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
PopulateNewFromLookupColumnName
Returns OpenFromRelatedColumnName
Declaration
public override string PopulateNewFromLookupColumnName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
PreventDuplicateLookupIDs
If PopulateNewFromLookupColumnName is set and this is true then the system will ensure that new items are only created for selected entities that there are no current existing items with those values too
In other words this prevents duplication of items in the collection that have the same value for the PopulateNewFromLookupColumnName property on entity type ITransactionAllocated
Declaration
public override bool PreventDuplicateLookupIDs { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
TransactionValuesAllocatedEntityTargetFilter
Declaration
public static RelatedItemSearchExecuter TransactionValuesAllocatedEntityTargetFilter { get; set; }
Property Value
Type | Description |
---|---|
RelatedItemSearchExecuter |
Methods
AlterQuery(QueryableExecuter<ITransactionAllocated>)
Additionally alters the base query alteration by ensuring all entities returned are related to the SingleItem by having their CollectionRelationshipColumnName have the same value as the SingleItem ID
This is achieved via AddRelationshipJoin(QueryableExecuter<TCollection>) which can be overidden to customise how the entities of type ITransactionAllocated are precisely related to the SingleItem if not directly through that join
Declaration
protected override QueryableExecuter<ITransactionAllocated> AlterQuery(QueryableExecuter<ITransactionAllocated> query)
Parameters
Type | Name | Description |
---|---|---|
QueryableExecuter<ITransactionAllocated> | query | The existing query to return all the results that will populate the grid |
Returns
Type | Description |
---|---|
QueryableExecuter<ITransactionAllocated> | An altered query that also ensures all entities returned are related to the SingleItem by having their CollectionRelationshipColumnName have the same value as the SingleItem ID |
Overrides
CanDelete(ITransactionAllocated)
Indicates if the selected item is allowed to be deleted based on the status of the item itself
The default implementation is false, allowing specific controller implementations to provide override values
Declaration
public override Task<bool> CanDelete(ITransactionAllocated item)
Parameters
Type | Name | Description |
---|---|---|
ITransactionAllocated | item | The item to check if it can be deleted |
Returns
Type | Description |
---|---|
Task<bool> | True if the specified item can be deleted |
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()
Header groupings that columns belong to. Can be hierarchical
Declaration
public override IEnumerable<GridColumnGroup> ColumnGroups()
Returns
Type | Description |
---|---|
IEnumerable<GridColumnGroup> |
Overrides
Columns()
Provides a list of all the columns to be created against the IBaseGrid<T> by this control
The default behaviour is to enumerate ColumnNames() and create the list automatically. You can also override AlterColumnInfo(ControlDisplayInfo) to provide more detail for specific columns
Alternatively you can override this to explicitly define themDeclaration
public override IEnumerable<ControlDisplayInfo> Columns()
Returns
Type | Description |
---|---|
IEnumerable<ControlDisplayInfo> | A list of all the columns to be created against the IBaseGrid<T> by this control |
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
GetExportableColumnInfo(IEnumerable<ColumnDescriptor>)
Returns all the information on the columns that can be exported from this grid
The default information contains the info of all Columns() in the grid
Declaration
public override Task<IEnumerable<ControlDisplayVisibilityInfo>> GetExportableColumnInfo(IEnumerable<ColumnDescriptor> visibleColumns)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ColumnDescriptor> | visibleColumns | The currently visible columns in the grid |
Returns
Type | Description |
---|---|
Task<IEnumerable<ControlDisplayVisibilityInfo>> | All the information on the columns that can be exported from this 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<ITransactionAllocated>> GetGridSourceItems()
Returns
Type | Description |
---|---|
Task<IEnumerable<ITransactionAllocated>> | The result of executing the GetCurrentQuery() to return all the entities that should be displayed in this 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 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
LoadCodeValues()
Declaration
protected Task LoadCodeValues()
Returns
Type | Description |
---|---|
Task |
RemoveItems(IEnumerable<ITransactionAllocated>)
Removes the specified set of items from the grid and if the items in the grid have a property marked as SequenceStart then it will decrement the ones above these deleted items to reflect their change in order
Declaration
public override Task RemoveItems(IEnumerable<ITransactionAllocated> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ITransactionAllocated> | items | The items to be removed from the CurrentItems |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
UpdateLocked()
Updates the view itself to reflect the lock status of this controller, ensuring all the controls conform to them
Declaration
public void UpdateLocked()
UpdateNewItem(ITransactionAllocated)
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(ITransactionAllocated item)
Parameters
Type | Name | Description |
---|---|---|
ITransactionAllocated | item | The new item created for this grid |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |