private void PD0201_Load(object sender, EventArgs e) { try { SetScreenName(); txtCode.Select(); var loadTask = new List <Task>(); if (Company == null) { loadTask.Add(LoadCompanyAsync()); } if (ApplicationControl == null) { loadTask.Add(LoadApplicationControlAsync()); } loadTask.Add(LoadColumnNameSettingAsync()); loadTask.Add(LoadControlColorAsync()); ProgressDialog.Start(ParentForm, Task.WhenAll(loadTask), false, SessionKey); Importer = new ReceiptImporter(Login, ApplicationControl); Clear(); Modified = false; txtCode.PaddingChar = '0'; } catch (Exception ex) { Debug.Fail(ex.ToString()); NLogHandler.WriteErrorLog(this, ex, SessionKey); } }
public ReceiptImporterWorker(LogWriter logger, ILogin login, TaskSchedule task, ApplicationControl applicationControl) : base(logger, login, task) { Importer = new ReceiptImporter(login, applicationControl); Importer.ImporterSettingId = task.ImportSubType; }