Search Results for

    Show / Hide Table of Contents

    Class ExportData

    This command executes the ExportData system command

    Exports the data from the specified entity, ISQLWrapper, or ICollectionExportable controller

    Provides appropriate parameter selection for filtering, columns, and parameters
    Inheritance
    object
    BaseHasChildren<EPCommandWithDescriptor>
    EPCommand
    EPCommandWithDescriptor
    ViewCommand
    TaskBase
    ExportData
    Implements
    IHasChildren<EPCommandWithDescriptor>
    IHasChildren
    IDisposable
    IEPCommandWithDescriptor
    IEPCommand
    ICommand
    ICommandDescriptor
    Inherited Members
    TaskBase.GetUserModifiedParametersFromDefault(IModelLayoutCommon, ServerTaskParameter)
    TaskBase.InternalExecuteUserWarning()
    TaskBase.ProcessExecute(ServerTaskParameter, bool, ServerTaskOccurrence?, short?)
    TaskBase.RunOnServer
    TaskBase.Description
    TaskBase.Key
    TaskBase.ModifierKeys
    TaskBase.IsQuickAccessCommand
    TaskBase.ToolTip
    TaskBase.TaskType
    TaskBase.TaskParamType
    ViewCommand.Type
    EPCommandWithDescriptor.OverlayIconID
    EPCommandWithDescriptor.Parameter
    EPCommandWithDescriptor.HelpURL
    EPCommand.OnCanExecuteChanged()
    EPCommand.LoadChildrenAsync()
    EPCommand.SetToggler(IHasToggleStatus)
    EPCommand.OnLayoutsChanged(IModelLayoutHost, LayoutChangeEventArgs)
    EPCommand.ExternalExecute(object)
    EPCommand.InternalExecute(object)
    EPCommand.ExternalCanExecute(object)
    EPCommand.InternalCanExecute(object)
    EPCommand.GetModifierText(IEPCommand)
    EPCommand.RemoveEventHandlersOnDispose()
    EPCommand.Dispose(bool)
    EPCommand.Dispose()
    EPCommand.RootController
    EPCommand.ActiveDisplayerFromOwner
    EPCommand.ReloadChildrenOnEachOpen
    EPCommand.HasChildCommands
    EPCommand.SubscribeToLayoutChange
    EPCommand.From
    EPCommand.LockExecution
    EPCommand.CustomType
    EPCommand.Owner
    EPCommand.Toggler
    EPCommand.CanExecuteChanged
    BaseHasChildren<EPCommandWithDescriptor>.AddChild(EPCommandWithDescriptor, bool)
    BaseHasChildren<EPCommandWithDescriptor>.DeleteChild(EPCommandWithDescriptor)
    BaseHasChildren<EPCommandWithDescriptor>.ClearChildren()
    BaseHasChildren<EPCommandWithDescriptor>.ClearMyParent()
    BaseHasChildren<EPCommandWithDescriptor>.AddChild(IHasChildren)
    BaseHasChildren<EPCommandWithDescriptor>.DeleteChild(IHasChildren)
    BaseHasChildren<EPCommandWithDescriptor>.Order
    BaseHasChildren<EPCommandWithDescriptor>.Children
    BaseHasChildren<EPCommandWithDescriptor>.Parent
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Commands
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    [CommandDescriptorOptions(Command.ExportData, typeof(ExportCSVParameter))]
    public class ExportData : TaskBase, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor

    Constructors

    ExportData(IRootController, IModelLayoutCommon, IEntityDescriptorFactory, IStorageServiceFactory)

    Creates a new ExportData command set to run on the server, ignoring any ICollectionExportable implementation, and allowing the user to make entity or sql wrapper selections and configuration

    Declaration
    public ExportData(IRootController root, IModelLayoutCommon owner, IEntityDescriptorFactory entityDescriptorFactory, IStorageServiceFactory storageServiceFactory)
    Parameters
    Type Name Description
    IRootController root

    The root controller, for service access.

    IModelLayoutCommon owner

    The owning context for this command

    IEntityDescriptorFactory entityDescriptorFactory
    IStorageServiceFactory storageServiceFactory

    ExportData(IRootController, ModelViewController, Func<EntityDescriptor>)

    Creates a new ExportData command set to export data from the specified type of entity only

    Declaration
    public ExportData(IRootController root, ModelViewController controller, Func<EntityDescriptor> getDescriptor)
    Parameters
    Type Name Description
    IRootController root

    The root controller, for service access.

    ModelViewController controller

    The view controller to export data from. Can use the ICollectionExportable implementation of the controller.

    Func<EntityDescriptor> getDescriptor

    A function that return the type of entity to export data for

    ExportData(IRootController, ModelViewController, Func<Task<ISQLWrapper>>, Func<EntityDescriptor>, bool)

    Creates a new ExportData command

    Declaration
    public ExportData(IRootController root, ModelViewController controller, Func<Task<ISQLWrapper>> getWrapper, Func<EntityDescriptor> getDescriptor, bool ignoreGridContents = false)
    Parameters
    Type Name Description
    IRootController root

    The root controller, for service access.

    ModelViewController controller

    The view controller to export data from. Can use the ICollectionExportable implementation of the controller if ignoreGridContents is set to false

    Func<Task<ISQLWrapper>> getWrapper

    A function that returns the sql wrapper to use for exporting data if that is the type of data to automatically export from this command

    Func<EntityDescriptor> getDescriptor

    A function that return the entity to export if that is the type of data to automatically export from this command

    bool ignoreGridContents

    Indicates if the controller implements ICollectionExportable that it should be ignored and use either getWrapper or getDescriptor as a source for the data to be exported

    Properties

    CustomTitle

    A custom title for this command, other than just Export Data

    Declaration
    public string CustomTitle { get; set; }
    Property Value
    Type Description
    string

    IconID

    Returns system Excel image

    Declaration
    public override Guid IconID { get; }
    Property Value
    Type Description
    Guid
    Overrides
    TaskBase.IconID

    IncludeInSimple

    True - This command can be included automatically in any simple set of view commands

    Declaration
    public override bool IncludeInSimple { get; }
    Property Value
    Type Description
    bool
    Overrides
    TaskBase.IncludeInSimple

    InternalExecuteWithChanges

    Allow running this command with changes if there are no changes, or the data to be exported is coming from a local ICollectionExportable implementation

    Declaration
    protected override bool InternalExecuteWithChanges { get; }
    Property Value
    Type Description
    bool
    Overrides
    TaskBase.InternalExecuteWithChanges

    Title

    The Title to use for this command which is either the CustomTitle or if null, then the the Export Data Task title

    Declaration
    public override string Title { get; }
    Property Value
    Type Description
    string
    Overrides
    TaskBase.Title

    Methods

    GetParameters()

    If this is exporting a sql wrapper or entity, and one has not been set yet, then this will prompt the main export parameters dialog which allows a sql wrapper or entity selection and the parameters to be then set for either

    If a sql wrapper or entity is selected, then this will display the parameters for that selection in terms of filtering, columns, and query parameters

    Declaration
    protected override Task<ServerTaskParameter> GetParameters()
    Returns
    Type Description
    Task<ServerTaskParameter>

    A task indicating the completion of the operation

    Overrides
    TaskBase.GetParameters()

    InternalCanExecuteAsync(object)

    Returns true if exporting from local ICollectionExportable implementation, or if there are no changes and the data can be retrieved from a server call

    Declaration
    public override Task<bool> InternalCanExecuteAsync(object parameter)
    Parameters
    Type Name Description
    object parameter

    The command parameter

    Returns
    Type Description
    Task<bool>

    True if exporting from local ICollectionExportable implementation, or if there are no changes and the data can be retrieved from a server call

    Overrides
    EPCommand.InternalCanExecuteAsync(object?)

    InternalExecuteAsync(object)

    Gets the parameters for the task (possibly prompting the user for som if GetParameters() override calls GetUserModifiedParametersFromDefault(IModelLayoutCommon, ServerTaskParameter)) and executes the task locally or against a task service depending on the setup

    The system then also tracks the progress of the task in the application and notifies the user when the task is complete

    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

    Overrides
    TaskBase.InternalExecuteAsync(object)

    ProcessExecute(ServerTaskParameter, bool)

    Processes the export data task by sending it to the task server, or running locally if exporting directly from a ICollectionExportable implementation.

    Declaration
    public override Task ProcessExecute(ServerTaskParameter taskParam, bool isKeymodifierPressed)
    Parameters
    Type Name Description
    ServerTaskParameter taskParam

    The parameter for runnin this task

    bool isKeymodifierPressed

    Indicates if the key modifier is pressed indicating a service task should be run locally if it can be

    Returns
    Type Description
    Task

    A task indicating the completion of creating the task (and tracking it as it runs)

    Overrides
    TaskBase.ProcessExecute(ServerTaskParameter, bool)

    Implements

    IHasChildren<T>
    IHasChildren
    IDisposable
    IEPCommandWithDescriptor
    IEPCommand
    ICommand
    ICommandDescriptor

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    CommandExtensions.CreateCommand(EPCommand, ICommandDescriptor, CommandButtonType, bool, CommandSize)
    CommandExtensions.UpdateCommand(EPCommand, object, ICommandDescriptor, bool, CommandSize)
    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.