Search Results for

    Show / Hide Table of Contents

    Class ReportsController.NewItemDescriptor

    Inheritance
    object
    ReportsController.NewItemDescriptor
    Implements
    INewItemHelper<IReport>
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Views.Controllers
    Assembly: LemonEdge.ClientEntities.dll
    Syntax
    public class ReportsController.NewItemDescriptor : INewItemHelper<IReport>

    Constructors

    NewItemDescriptor(ReportsController)

    Declaration
    public NewItemDescriptor(ReportsController controller)
    Parameters
    Type Name Description
    ReportsController controller

    Properties

    Descriptor

    Declaration
    public EntityDescriptor Descriptor { get; }
    Property Value
    Type Description
    EntityDescriptor

    ItemName

    The singlular name of the item to be created.

    Declaration
    public virtual string ItemName { get; }
    Property Value
    Type Description
    string

    OverlayIconID

    The default icon to overlay over the new image for the command to create a new entity of type IReport

    Declaration
    public Guid? OverlayIconID { get; }
    Property Value
    Type Description
    Guid?

    Methods

    CanCreate(UserInfo, IReadOnlyCache, IEntityUpdater)

    Returns true if the user has permissions to create a new entity of type IReport

    Declaration
    public Task<bool> CanCreate(UserInfo userInfo, IReadOnlyCache cache, IEntityUpdater updater)
    Parameters
    Type Name Description
    UserInfo userInfo

    The currently logged in user

    IReadOnlyCache cache

    A local cache

    IEntityUpdater updater

    The context the items are being created in and can be added to

    Returns
    Type Description
    Task<bool>

    True if the user has permissions to create a new entity of type IReport

    CreateNewItem(UserInfo, IReadOnlyCache, IEntityUpdater)

    Creates a collection of new entities of type IReport

    Declaration
    public Task<IEnumerable<IReport>> CreateNewItem(UserInfo userInfo, IReadOnlyCache cache, IEntityUpdater updater)
    Parameters
    Type Name Description
    UserInfo userInfo

    The current logged in user

    IReadOnlyCache cache

    A local cache

    IEntityUpdater updater

    The context the items are being created in and can be added to

    Returns
    Type Description
    Task<IEnumerable<IReport>>

    A list of the newly created items.

    GetOpenDescriptor(IEntityUpdaterUI, IReport)

    Returns the descriptor used for displaying the new item in a new tab context in the application

    Declaration
    public Task<DisplayableItemDescriptor> GetOpenDescriptor(IEntityUpdaterUI updater, IReport item)
    Parameters
    Type Name Description
    IEntityUpdaterUI updater

    The current context the new item has been created within

    IReport item

    The new item itself that should be displayed in its own tab layout

    Returns
    Type Description
    Task<DisplayableItemDescriptor>

    A descriptor used for displaying the new item in a new tab context in the application

    MarkForInsert(IEntityUpdaterUI, IReport)

    For each new item created the system calls this to mark the item as a new pending change in the updater context

    Provides a mechanism to add other related new items into the context too that may have been created for each "Top Level;" entity

    Declaration
    public void MarkForInsert(IEntityUpdaterUI updater, IReport item)
    Parameters
    Type Name Description
    IEntityUpdaterUI updater

    The updater context the new items are being created in

    IReport item

    The newly created entity

    Implements

    INewItemHelper<T>

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.