private void timer1_Tick(object sender, EventArgs e)
 {
     timer1.Stop();
     try
     {
         CmcsConfirm confirm = CommonDAO.GetInstance().GetConfirm(this.CurrentAutotruckId, eConfirmType.来煤预报.ToString());
         if (confirm != null && !string.IsNullOrEmpty(confirm.ResultId))
         {
             this.Output       = CommonDAO.GetInstance().SelfDber.Get <CmcsLMYB>(confirm.ResultId);
             this.DialogResult = DialogResult.OK;
             this.Close();
         }
     }
     catch { }
     timer1.Start();
 }
Example #2
0
 /// <summary>
 /// 监听确认结果
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void timer1_Tick(object sender, EventArgs e)
 {
     timer1.Stop();
     try
     {
         CmcsConfirm confirm = commonDAO.GetConfirm(this.transportId, eConfirmType.未完成运输记录.ToString());
         if (confirm != null && !string.IsNullOrEmpty(confirm.ResultId))
         {
             if (confirm.ResultId == this.transportId)//使用当前运输记录
             {
                 this.DialogResult = DialogResult.OK;
             }
             else
             {
                 this.DialogResult = DialogResult.Yes;
             }
             this.Close();
         }
     }
     catch { }
     timer1.Start();
 }