Ejemplo n.º 1
0
 protected override object[] doService(object[] param)
 {
     object[] objArray = new object[] { 0 };
     try
     {
         if (this.fpxfMain == null)
         {
             this.fpxfMain = new FpxfMain();
         }
         this.fpxfMain.XFYear         = this.CardClock.Year;
         this.fpxfMain.XFMonth        = 0;
         this.fpxfMain.XFIsShowDialog = false;
         this.fpxfMain.ShowDialog();
         this.fpxfMain.AutoEvent.WaitOne();
         if (this.fpxfMain != null)
         {
             this.fpxfMain = null;
             GC.Collect();
         }
         this.loger.Error("fpxfMain.StartThread(fpxfArgs)执行结束");
         objArray[0] = 1;
         return(objArray);
     }
     catch (Exception exception)
     {
         this.loger.Error("[FPXiuFuShareMethods函数异常]" + exception.Message);
         return(objArray);
     }
 }
Ejemplo n.º 2
0
 protected override void RunCommand()
 {
     try
     {
         this.fpxfMain = new FpxfMain();
         if ((this.fpxfMain.xfThrad == null) || !this.fpxfMain.xfThrad.IsAlive)
         {
             SelectMonth.IsChaxun = false;
             SelectMonth.IsSingle = false;
             dlgSelectMonth       = new SelectMonth();
             dlgSelectMonth.Text  = "发票修复";
             if (DialogResult.OK == dlgSelectMonth.ShowDialog())
             {
                 this.fpxfMain.XFYear         = dlgSelectMonth.Year;
                 this.fpxfMain.XFMonth        = dlgSelectMonth.Month;
                 this.fpxfMain.XFFpdm         = SelectMonth.FPDM;
                 this.fpxfMain.XFFPHM         = SelectMonth.FPHM;
                 this.fpxfMain.IsSingle       = SelectMonth.IsSingle;
                 this.fpxfMain.XFIsShowDialog = true;
                 if (dlgSelectMonth != null)
                 {
                     dlgSelectMonth.Close();
                     dlgSelectMonth.Dispose();
                     dlgSelectMonth = null;
                 }
                 this.fpxfMain.ShowDialog();
                 this.fpxfMain.AutoEvent.WaitOne();
             }
             if (this.fpxfMain != null)
             {
                 this.fpxfMain.DisposeFormThread(this.fpxfMain);
                 this.fpxfMain = null;
             }
             this.loger.Error("发票修复线程运行结束,所有资源释放结束");
         }
     }
     catch (Exception exception)
     {
         this.loger.Error(exception.Message);
         MessageManager.ShowMsgBox(exception.Message);
     }
 }