Exemple #1
0
 private void btnImport_Click(object sender, EventArgs e)
 {
     try
     {
         ImportCode code = new ImportCode {
             BmType = BMType.GoodsTax
         };
         if (code.ShowDialog() == DialogResult.OK)
         {
             ImportResult result;
             code.Visible = false;
             try
             {
                 result = this.customerManager.ImportGoodsTax(code.FilePath);
             }
             catch
             {
                 throw;
             }
             new ImportReport(result).ShowDialog();
             this.aisinoDataGrid1.DataSource = this.customerManager.QueryGoodsTax(this.customerManager.Pagesize, this.customerManager.CurrentPage);
         }
     }
     catch (CustomException exception)
     {
         MessageBoxHelper.Show(exception.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     catch (Exception exception2)
     {
         this.log.Error(exception2.ToString());
         ExceptionHandler.HandleError(exception2);
     }
 }
Exemple #2
0
 private void btnImport_Click(object sender, EventArgs e)
 {
     try
     {
         ImportCode code = new ImportCode {
             BmType = this.GetBMType()
         };
         if (code.ShowDialog() == DialogResult.OK)
         {
             code.Visible = false;
             ImportReport report = new ImportReport(this.ImportMethod(code.FilePath));
             if (this.GetBMType() != BMType.BM_SPFL)
             {
                 report.ShowDialog();
             }
             ProgressHinter instance = ProgressHinter.GetInstance();
             instance.SetMsg("正在调整" + this.treeViewBM1.RootNodeString + "...");
             instance.StartCycle();
             try
             {
                 ServiceFactory.InvokePubService("Aisino.Fwkp.Bmgl.AdjustTopBM", new object[] { this.GetBMType().ToString() });
             }
             catch
             {
                 throw;
             }
             finally
             {
                 instance.CloseCycle();
             }
             this.aisinoDataGrid1.DataSource = this.bllManager.QueryData(this.bllManager.Pagesize, this.bllManager.CurrentPage);
             this.treeViewBM1.TreeLoad();
             this.treeViewBM1.SelectNodeByText(this.treeViewBM1.RootNodeString);
         }
     }
     catch (CustomException exception)
     {
         MessageBoxHelper.Show(exception.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     catch (Exception exception2)
     {
         this.log.Error(exception2.ToString());
         ExceptionHandler.HandleError(exception2);
     }
 }