Class CancelTransaction
A view command that cancels the active IHeaderTransactionalEntity, or all selected ones in a grid
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ViewCommands
Assembly: LemonEdge.ClientCore.dll
Syntax
public class CancelTransaction : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
CancelTransaction(IRootController, IModelLayoutDisplayer, IGridSelector)
Creates a new CancelTransaction
Declaration
public CancelTransaction(IRootController root, IModelLayoutDisplayer owner, IGridSelector view = null)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | |
IModelLayoutDisplayer | owner | The owning layout that is displaying the IHeaderTransactionalEntity to cancel |
IGridSelector | view | An optional grid that holds the selected IHeaderTransactionalEntity to
cancel instead of the |
Properties
Description
A user friendly description of this command
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
Guid |
Overrides
IncludeInSimple
By default view commands are included in any simple layout filtering of commands if they are part of the quick access
Declaration
public override bool IncludeInSimple { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
OverlayIconID
On some clients another image can be overlayed on the bottom right of the main icon (for indicating add, remove, etc)
This optional overlay image can be specified here, either a ImageType or ImageID
Declaration
public override Guid? OverlayIconID { get; }
Property Value
Type | Description |
---|---|
Guid? |
Overrides
Title
The title of this command
Declaration
public override string Title { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
ToolTip
A user friendly tool tip for this command functionality, by default the Description
Declaration
public override string ToolTip { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
InternalCanExecuteAsync(object)
Returns true if the transaction to cancel (either from the layout or selected grid items) are currently finalized
Declaration
public override Task<bool> InternalCanExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
Task<bool> | True if the transaction to cancel (either from the layout or selected grid items) are currently finalized |
Overrides
InternalExecuteAsync(object)
Gets the transaction(s) to be cancelled, and prompts the user with a warning. If the user accepts the change then all the transactions are marked as cancelled and saved. The save process takes care of the cancelling operation itself.
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |