public async Task <byte[]> GetAsync(CustomerLedgerSearch option, IProgressNotifier notifier, CancellationToken token = default(CancellationToken)) { var companyTask = companyQueryProcessor.GetAsync(new CompanySearch { Id = option.CompanyId, }, token); var loadTask = customerLedgerProcessor.GetAsync(option, token, notifier); await Task.WhenAll(companyTask, loadTask); var company = companyTask.Result.First(); var items = loadTask.Result.ToList(); if (!items.Any()) { return(null); } var report = new CustomerLedgerSectionReport(); report.SearchOption = option; report.SetBasicPageSetting(company.Code, company.Name); report.Name = "得意先別消込台帳" + DateTime.Today.ToString("yyyyMMdd"); report.SetData(items, option.Precision); report.Run(); return(report.Convert()); }
public async Task <CustomerLedgersResult> GetAsync(string SessionKey, CustomerLedgerSearch SearchOption, string connectionId) { return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token => { var notifier = hubContext.CreateNotifier(connectionId); var result = await customerLedgerProcessor.GetAsync(SearchOption, token, notifier); return new CustomerLedgersResult { ProcessResult = new ProcessResult { Result = true, }, CustomerLedgers = new List <CustomerLedger>(result), }; }, logger, connectionId)); }
public async Task <ActionResult <IEnumerable <CustomerLedger> > > GetR(CustomerLedgerSearch option) => await hubContext.DoAsync(option.ConnectionId, async (notifier, token) => (await customerLedgerProcessor.GetAsync(option, token, notifier)).ToArray());