Esempio n. 1
0
        private void PC1001_Load(object sender, EventArgs e)
        {
            try
            {
                SetScreenName();
                this.ActiveControl = txtPatternNo;
                txtPatternNo.Focus();
                var tasks = new List <Task>();
                if (Company == null)
                {
                    tasks.Add(LoadCompanyAsync());
                }
                if (ApplicationControl == null)
                {
                    tasks.Add(LoadApplicationControlAsync());
                }
                tasks.Add(LoadColumnNameSetting());
                tasks.Add(LoadControlColorAsync());

                ProgressDialog.Start(ParentForm, Task.WhenAll(tasks), false, SessionKey);
                Importer = new PaymentScheduleImporter(Login, ApplicationControl);

                lblTitleMoney.Visible = !UseForeignCurrency;
                lblMoney.Visible      = !UseForeignCurrency;
                ClearInner();
                Modified = false;
            }
            catch (Exception ex)
            {
                Debug.Fail(ex.ToString());
                NLogHandler.WriteErrorLog(this, ex, SessionKey);
            }
        }
Esempio n. 2
0
 public PaymentScheduleImporterWorker(LogWriter logger,
                                      ILogin login,
                                      TaskSchedule task,
                                      ApplicationControl applicationControl)
     : base(logger, login, task)
 {
     Importer = new PaymentScheduleImporter(login, applicationControl);
     Importer.ImporterSettingId         = task.ImportSubType;
     Importer.DoReplaceAmount           = task.BillingAmount == 0;
     Importer.DoTargetNotMatchedData    = task.TargetBillingAssignment == 0;
     Importer.DoIgnoreSameCustomerGroup = task.UpdateSameCustomer == 0;
 }