Beispiel #1
0
 void read()
 {
     while (true)
     {
         try
         {
             Thread.Sleep(300);
             if (isCloseForm)
             {
                 return;
             }
             wtCard = wt.GetCardNoByBusReader();
             if (wtCard == null)
             {
                 continue;
             }
             if (wtCard.Length == 16)
             {
                 Payment.wintopReChargeParam.WtCardNo = wtCard;
                 if (isCloseForm)
                 {
                     return;
                 }
                 PrintInfo("正在读取,请稍后...");
                 WintopStatusInfo statusInfo = new WintopAccess().queryCardStatus(wtCard);
                 if ((statusInfo.msgrsp.WTSTATE == null) || (statusInfo.msgrsp.WTSTATE.Equals("")))
                 {
                     PrintInfo("业务正忙,请稍后再试");
                     return;
                 }
                 if (!"01".Equals(statusInfo.msgrsp.WTSTATE))
                 {
                     PrintInfo("该卡已挂失,无法正常使用");
                     return;//
                 }//
                 Util.JumpUtil.jumpCommonPage("FormCitizenStep");
                 return;
             }
             else
             {
                 continue;
             }
         }
         catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); }
         catch (Exception ex)
         {
             log.Write("error:读取万通卡异常:" + ex.Message);
             continue;
         }
     }
 }