예제 #1
0
        public void ThreadAction()
        {
            while (true)
            {
                try
                {
                    OAInvoiceHelper oa     = new OAInvoiceHelper();
                    string          result = oa.Run();
                    if (int.Parse(result) > 0)
                    {
                        FileLogger.WriteLog("成功处理", 1, "InvoiceForm", "ThreadAction", "DataService", "AppMessage");
                    }

                    System.Threading.Thread.Sleep(interval * 60 * 1000);
                }
                catch (Exception err)
                {
                    FileLogger.WriteLog(err.Message, 1, "InvoiceForm", "ThreadAction", "DataService", "ErrMessage");
                    System.Threading.Thread.Sleep(interval * 60 * 1000);
                }
            }
        }
예제 #2
0
 private void btDebug_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
         if (txFileName.Text.Trim().Length == 0)
         {
             MessageBox.Show("单号不能为空", "系统提示");
         }
         else
         {
             iTR.OP.Invoice.OAInvoiceHelper invoice = new OAInvoiceHelper();
             invoice.Run(1, txFileName.Text.Trim());
         }
         this.Cursor = System.Windows.Forms.Cursors.Arrow;//设置鼠标为正常状态
         MessageBox.Show("查验完成", "系统提示");
     }
     catch (Exception err)
     {
         this.Cursor = System.Windows.Forms.Cursors.Arrow;//设置鼠标为正常状态
         MessageBox.Show(err.Message, "系统提示");
     }
 }