Search Results for

    Show / Hide Table of Contents

    Class BaseDefaultSingleViewExtenderController<DISPLAYTYPE, EXTENDEDTYPE>

    The core controller for providing a IBaseDefaultSingleView<T> against an entity that extends (IsTypeExtender) another type

    If the DISPLAYTYPE does not exist this will temporarily create one and only add it to pending changes when the user actually modifies the temporary item itself

    Inheritance
    System.Object
    ModelViewController
    BaseDefaultSingleViewController<DISPLAYTYPE>
    BaseDefaultSingleViewExtenderController<DISPLAYTYPE, EXTENDEDTYPE>
    Implements
    IModelViewController
    Inherited Members
    BaseDefaultSingleViewController<DISPLAYTYPE>.GetSingleViewController(IBaseDefaultSingleView<DISPLAYTYPE>, String)
    BaseDefaultSingleViewController<DISPLAYTYPE>.SingleItem
    BaseDefaultSingleViewController<DISPLAYTYPE>.SingleView
    BaseDefaultSingleViewController<DISPLAYTYPE>.InitAsync()
    BaseDefaultSingleViewController<DISPLAYTYPE>.Descriptor
    BaseDefaultSingleViewController<DISPLAYTYPE>.SetAndLoadSingleItem()
    BaseDefaultSingleViewController<DISPLAYTYPE>.LoadControls()
    BaseDefaultSingleViewController<DISPLAYTYPE>.ViewDisplayType
    BaseDefaultSingleViewController<DISPLAYTYPE>.ViewMaxWidth
    BaseDefaultSingleViewController<DISPLAYTYPE>.ViewMaxHeight
    BaseDefaultSingleViewController<DISPLAYTYPE>.ViewRowCount
    BaseDefaultSingleViewController<DISPLAYTYPE>.ViewColumnCount
    BaseDefaultSingleViewController<DISPLAYTYPE>.DisplayUI()
    BaseDefaultSingleViewController<DISPLAYTYPE>.Controls()
    BaseDefaultSingleViewController<DISPLAYTYPE>.ControlNames()
    BaseDefaultSingleViewController<DISPLAYTYPE>.HasParentToAnyRelationship
    BaseDefaultSingleViewController<DISPLAYTYPE>.AlterControlInfo(ControlDisplayInfo)
    BaseDefaultSingleViewController<DISPLAYTYPE>.GetControlDescriptor(String)
    ModelViewController.CurrentDisplayedItem
    ModelViewController.CanWrite
    ModelViewController.CheckIsLockedForCanWrite
    ModelViewController.View
    ModelViewController.DisplayItem(Object)
    ModelViewController.ShouldDisplayItem(Object)
    ModelViewController.DisplayIfNull
    ModelViewController.Redisplay()
    ModelViewController.RemoveHandlers(Object)
    ModelViewController.AddHandlers(Object)
    ModelViewController.CloseController()
    ModelViewController.InitCommands(IList<ViewCommand>)
    ModelViewController.RemoveCommand(ViewCommand)
    ModelViewController.RemoveCommands<OFType>()
    ModelViewController.InsertCommand(ViewCommand, Int32)
    ModelViewController.InsertCommand(ViewCommand, ViewCommand, ViewCommand)
    ModelViewController.Commands
    ModelViewController.UpdateAllCommands()
    ModelViewController.SelectedItemForSubViews
    ModelViewController.ContextHelpURL
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Client.Core.Views.Core
    Assembly: ClientCore.dll
    Syntax
    public abstract class BaseDefaultSingleViewExtenderController<DISPLAYTYPE, EXTENDEDTYPE> : BaseDefaultSingleViewController<DISPLAYTYPE>, IModelViewController where DISPLAYTYPE : IBaseEntity where EXTENDEDTYPE : IBaseEntity
    Type Parameters
    Name Description
    DISPLAYTYPE

    The type that extends the EXTENDEDTYPE and will be displayed/edited in the IBaseDefaultSingleView<T>

    This type must have a relationship to the EXTENDEDTYPE marked with IsTypeExtender

    EXTENDEDTYPE

    The type that DISPLAYTYPE is extending and will be passed in to this view to display, before the view loads the DISPLAYTYPE and displays that instead

    Constructors

    BaseDefaultSingleViewExtenderController(IBaseDefaultSingleView<DISPLAYTYPE>)

    Creates a new default single view extender controller with the specified instance of a default single view

    Declaration
    public BaseDefaultSingleViewExtenderController(IBaseDefaultSingleView<DISPLAYTYPE> view)
    Parameters
    Type Name Description
    IBaseDefaultSingleView<DISPLAYTYPE> view

    The instance of the default single view in the client application

    Properties

    ExtendRelationshipExtendedTypeColumn

    The property on the EXTENDEDTYPE type that is the target of the IsTypeExtender relationship from the DISPLAYTYPE type

    Declaration
    protected virtual string ExtendRelationshipExtendedTypeColumn { get; }
    Property Value
    Type Description
    System.String

    ExtendRelationshipSourceDisplayTypeColumn

    The property on the DISPLAYTYPE type that has a IsTypeExtender relationship linking to the EXTENDEDTYPE type

    Declaration
    protected abstract string ExtendRelationshipSourceDisplayTypeColumn { get; }
    Property Value
    Type Description
    System.String

    TrackItemChanges

    We always track items as we have to see if a temporary DISPLAYTYPE entity created has been changed an needs to be inserted into the context for changes

    Declaration
    public override bool TrackItemChanges { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseDefaultSingleViewController<DISPLAYTYPE>.TrackItemChanges

    Methods

    Clear()

    Removes any cached internal items

    Declaration
    public override Task Clear()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Overrides
    ModelViewController.Clear()

    LoadSingleItem()

    Loads the DISPLAYTYPE to be displayed against this EXTENDEDTYPE instance from the IsTypeExtender relationship between the two

    If the item does not exist then a dummy one is created and cached, it is added to changes for this context only when the user actually makes a change to the dummy extending item instance (probably from this IBaseDefaultSingleView<T> view)

    Declaration
    public override Task<DISPLAYTYPE> LoadSingleItem()
    Returns
    Type Description
    System.Threading.Tasks.Task<DISPLAYTYPE>

    The extending item to be displayed in this IBaseDefaultSingleView<T> view

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseDefaultSingleViewController<DISPLAYTYPE>.LoadSingleItem()

    OnTrackedItemChanged(Object, String)

    If the DISPLAYTYPE has changed and we just temporarily created it as a new item as it did not exist yet, then we need to add it to the context as a pending change

    If the temporary DISPLAYTYPE is never changed then we do not want to save it as the user has not made any changes that warrant the extending type to exist if it did not before

    Declaration
    protected override void OnTrackedItemChanged(object item, string propName)
    Parameters
    Type Name Description
    System.Object item

    The item that changed

    System.String propName

    The property that changed

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseDefaultSingleViewController<DISPLAYTYPE>.OnTrackedItemChanged(System.Object, System.String)

    Implements

    IModelViewController

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.