Class TransactionController
Inheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientEntities.dll
Syntax
public class TransactionController : BaseDefaultSingleViewController<ITransaction>, ILockableController, IModelViewController
Constructors
TransactionController(IBaseDefaultSingleView<ITransaction>)
Declaration
public TransactionController(IBaseDefaultSingleView<ITransaction> view)
Parameters
Type | Name | Description |
---|---|---|
IBaseDefaultSingleView<ITransaction> | view |
Properties
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
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
ListenToChanges
We check changes if HasParentToAnyRelationship is true
Declaration
public override bool ListenToChanges { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
LockableHandler
The implementation that specified if this view can be edited/locked
Declaration
public ILockable LockableHandler { get; }
Property Value
Type | Description |
---|---|
ILockable |
Methods
AlterControlInfo(ControlDisplayInfo)
Automatically assigns relationship control info and other work for controls from the entity definition itself
Provides inheriting classes the option to tailor any control as much as they like before it is created in the SingleView
Declaration
protected override void AlterControlInfo(ControlDisplayInfo info)
Parameters
Type | Name | Description |
---|---|---|
ControlDisplayInfo | info | The control definition to be altered |
Overrides
Clear()
Clears the associated View back to an initial blank state
Declaration
public override Task Clear()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
ControlNames()
A list of all the controls to be dynamically created in the SingleView
This is used by the system to create the actual ControlDisplayInfo classes required from the Controls() property
You can override this to provide a simple definition of each control (combined with AlterControlInfo(ControlDisplayInfo) for more detail), or you can just override Controls() and ignore thisDeclaration
protected override IEnumerable<ControlDisplayInfoLight> ControlNames()
Returns
Type | Description |
---|---|
IEnumerable<ControlDisplayInfoLight> | A list of all the controls to be dynamically created in the SingleView |
Overrides
Controls()
A list of all the controls to be dynamically created in the SingleView
Can be overridden by the inheriting class to indicate the controls required. Typically you can override ControlNames() for a lighter approach and AlterControlInfo(ControlDisplayInfo) for any specific detail
Declaration
protected override IEnumerable<ControlDisplayInfo> Controls()
Returns
Type | Description |
---|---|
IEnumerable<ControlDisplayInfo> | A list of all the controls to be dynamically created in the SingleView |
Overrides
DisplayUI()
Loads all the controls dynamically into the SingleView if they haven't been already, loads the item to be displayed and then displays it against the view itself
Declaration
public override Task DisplayUI()
Returns
Type | Description |
---|---|
Task |
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>)
Provides the inheriting class an opportunity to add custom commands to this controller
Declaration
protected override void InitCommands(IList<ViewCommand> commands)
Parameters
Type | Name | Description |
---|---|---|
IList<ViewCommand> | commands | The current set of commands for this controller |
Overrides
LoadControls()
Provides an inheriting class an opportunity to load the controls this view should display dynamically
Declaration
public override Task LoadControls()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
OnTrackedItemChanged(object, string)
If HasParentToAnyRelationship is true then it will update the control holding that relationship value to keep changes in sync in the views to the user
Declaration
protected override void OnTrackedItemChanged(object item, string propName)
Parameters
Type | Name | Description |
---|---|---|
object | item | The item that had a property changed |
string | propName | The name of the changed property |
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()