Class GLPostingAllocatedController
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientEntities.dll
Syntax
public class GLPostingAllocatedController : BaseGridRelatedCollectionController<IGLPosting, IGLPostingAllocated>, IBaseGridController, ICollectionExportable, INewGridItemImplementor<IGLPostingAllocated>, ICopyGridItemImplementor<IGLPostingAllocated>, IGrid, IDeleteGridItemImplementor<IGLPostingAllocated>, ISearchController, ILockableController, IModelViewController
Constructors
GLPostingAllocatedController(IBaseGridRelatedCollection<IGLPosting, IGLPostingAllocated>)
Declaration
public GLPostingAllocatedController(IBaseGridRelatedCollection<IGLPosting, IGLPostingAllocated> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseGridRelatedCollection<IGLPosting, IGLPostingAllocated> | 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 IGLPostingAllocated 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 IGLPostingAllocated 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
GLPostingAllocatedEntityTargetFilter
Declaration
public static RelatedItemSearchExecuter GLPostingAllocatedEntityTargetFilter { get; set; }
Property Value
Type | Description |
---|---|
RelatedItemSearchExecuter |
LockableHandler
The implementation that specified if this view can be edited/locked
Declaration
public ILockable LockableHandler { get; }
Property Value
Type | Description |
---|---|
ILockable |
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 IGLPostingAllocated
Declaration
public override bool PreventDuplicateLookupIDs { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
AlterQuery(QueryableExecuter<IGLPostingAllocated>)
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 IGLPostingAllocated are precisely related to the SingleItem if not directly through that join
Declaration
protected override QueryableExecuter<IGLPostingAllocated> AlterQuery(QueryableExecuter<IGLPostingAllocated> query)
Parameters
Type | Name | Description |
---|---|---|
QueryableExecuter<IGLPostingAllocated> | query | The existing query to return all the results that will populate the grid |
Returns
Type | Description |
---|---|
QueryableExecuter<IGLPostingAllocated> | 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(IGLPostingAllocated)
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(IGLPostingAllocated item)
Parameters
Type | Name | Description |
---|---|---|
IGLPostingAllocated | item | The item to check if it can be deleted |
Returns
Type | Description |
---|---|
Task<bool> | True if the specified item can be deleted |
Overrides
CanEditRowItem(IGLPostingAllocated)
Indicates if the user is permitted to edit the specified row item from the state of the item itself
Declaration
public override bool CanEditRowItem(IGLPostingAllocated item)
Parameters
Type | Name | Description |
---|---|---|
IGLPostingAllocated | 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(IGLPostingAllocated, short)
Indicates if the user is permitted to edit the specified column for the specified row item
Declaration
public override bool CanEditRowItem(IGLPostingAllocated item, short columnDefinitionIndex)
Parameters
Type | Name | Description |
---|---|---|
IGLPostingAllocated | 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
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<IGLPostingAllocated>> GetGridSourceItems()
Returns
Type | Description |
---|---|
Task<IEnumerable<IGLPostingAllocated>> | The result of executing the GetCurrentQuery() to return all the entities that should be displayed in this grid |
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
RemoveItems(IEnumerable<IGLPostingAllocated>)
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<IGLPostingAllocated> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IGLPostingAllocated> | 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(IGLPostingAllocated)
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(IGLPostingAllocated item)
Parameters
Type | Name | Description |
---|---|---|
IGLPostingAllocated | item | The new item created for this grid |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |