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 parametersInheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: ClientCore.dll
Syntax
[CommandDescriptorOptions(Commands.ExportData, typeof(ExportCSVParameter))]
public class ExportData : TaskBase, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
ExportData(IModelLayoutCommon)
Creates a new ExportData command set to run on the server, ignoring any ICollectionExportable implemention, and allowing the user to make entity or sql wrapper selections and configuration
Declaration
public ExportData(IModelLayoutCommon owner)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | owner | The owning context for this command |
ExportData(ModelViewController, Func<EntityDescriptor>)
Creates a new ExportData command set to export data from the specified type of entity only
Declaration
public ExportData(ModelViewController controller, Func<EntityDescriptor> getDescriptor)
Parameters
Type | Name | Description |
---|---|---|
ModelViewController | controller | The view controller to export data from. Can use the ICollectionExportable implementation of the controller. |
System.Func<EntityDescriptor> | getDescriptor | A function that return the type of entity to export data for |
ExportData(ModelViewController, Func<Task<ISQLWrapper>>, Func<EntityDescriptor>, Boolean)
Creates a new ExportData command
Declaration
public ExportData(ModelViewController controller, Func<Task<ISQLWrapper>> getWrapper, Func<EntityDescriptor> getDescriptor, bool ignoreGridContents = false)
Parameters
Type | Name | Description |
---|---|---|
ModelViewController | controller | The view controller to export data from. Can use the ICollectionExportable implementation of the controller if |
System.Func<System.Threading.Tasks.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 |
System.Func<EntityDescriptor> | getDescriptor | A function that return the entity to export if that is the type of data to automatically export from this command |
System.Boolean | ignoreGridContents | Indicates if the |
Properties
CustomTitle
A custom title for this command, other than just Export Data
Declaration
public string CustomTitle { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IconID
Returns system Excel image
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
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 |
---|---|
System.Boolean |
Overrides
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 |
---|---|
System.Boolean |
Overrides
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 |
---|---|
System.String |
Overrides
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 |
---|---|
System.Threading.Tasks.Task<ServerTaskParameter> | A task indicating the completion of the operation |
Overrides
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 |
---|---|---|
System.Object | parameter | The command parameter |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if exporting from local ICollectionExportable implementation, or if there are no changes and the data can be retrieved from a server call |
Overrides
InternalExecuteAsync(Object)
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
ProcessExecute(ServerTaskParameter, Boolean)
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 |
System.Boolean | isKeymodifierPressed | Indicates if the key modifier is pressed indicating a service task should be run locally if it can be |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of creating the task (and tracking it as it runs) |