Class DataExportationWriterBase
- Namespace
- JJMasterData.Core.DataManager.Exportation.Abstractions
- Assembly
- JJMasterData.Core.dll
public abstract class DataExportationWriterBase : IBackgroundTaskWorker, IExportationWriter
- Inheritance
-
DataExportationWriterBase
- Implements
- Derived
- Inherited Members
Constructors
DataExportationWriterBase(IEncryptionService, ExpressionsService, IStringLocalizer<MasterDataResources>, IOptionsSnapshot<MasterDataCoreOptions>, ILogger<DataExportationWriterBase>)
protected DataExportationWriterBase(IEncryptionService encryptionService, ExpressionsService expressionsService, IStringLocalizer<MasterDataResources> stringLocalizer, IOptionsSnapshot<MasterDataCoreOptions> options, ILogger<DataExportationWriterBase> logger)
Parameters
encryptionService
IEncryptionServiceexpressionsService
ExpressionsServicestringLocalizer
IStringLocalizer<MasterDataResources>options
IOptionsSnapshot<MasterDataCoreOptions>logger
ILogger<DataExportationWriterBase>
Fields
RecordsPerPage
protected const int RecordsPerPage = 100000
Field Value
Properties
AbsoluteUri
public string AbsoluteUri { get; }
Property Value
Configuration
public ExportOptions Configuration { get; set; }
Property Value
CurrentFilter
Get = Recupera o filtro atual
public Dictionary<string, object> CurrentFilter { get; set; }
Property Value
CurrentOrder
Recupera a ordenação da tabela, por padrão utiliza o primeiro campo da chave primária
public OrderByData CurrentOrder { get; set; }
Property Value
- OrderByData
Ordem atual da tabela
Remarks
Para mais de um campo utilize virgula ex: "Campo1 ASC, Campo2 DESC, Campo3 ASC"
DataSource
Tabela com os dados
public IList<Dictionary<string, object>> DataSource { get; set; }
Property Value
Remarks
Datasource é propriedade responsável por controlar a origem de dados. O componente utiliza seguinte regra para recuperar os dados da grid:
1) Utiliza a propriedade DataSource; 2) Se a propriedade DataSource for nula, tenta executar a ação OnDataLoad; 3) Se a ação OnDataLoad não for implementada, tenta recuperar utilizando a proc informada no FormElement;FolderPath
Path where the files are generated.
public string FolderPath { get; }
Property Value
FormElement
Configurações pré-definidas do formulário
public FormElement FormElement { get; set; }
Property Value
ProcessOptions
public ProcessOptions ProcessOptions { get; set; }
Property Value
ProcessReporter
public DataExportationReporter ProcessReporter { get; }
Property Value
StringLocalizer
protected IStringLocalizer<MasterDataResources> StringLocalizer { get; }
Property Value
TotalOfRecords
public int TotalOfRecords { get; set; }
Property Value
UserId
public string UserId { get; set; }
Property Value
VisibleFields
protected List<FormElementField> VisibleFields { get; }
Property Value
Methods
GenerateDocument(Stream, CancellationToken)
public abstract Task GenerateDocument(Stream ms, CancellationToken token)
Parameters
ms
Streamtoken
CancellationToken
Returns
GetFileLink(FormElementField, Dictionary<string, object>, string)
protected string GetFileLink(FormElementField field, Dictionary<string, object> row, string value)
Parameters
field
FormElementFieldrow
Dictionary<string, object>value
string
Returns
Reporter(DataExportationReporter)
protected void Reporter(DataExportationReporter processReporter)
Parameters
processReporter
DataExportationReporter
RunWorkerAsync(CancellationToken)
public Task RunWorkerAsync(CancellationToken token)
Parameters
token
CancellationToken
Returns
Events
OnProgressChanged
public event EventHandler<IProgressReporter> OnProgressChanged