Ejemplo n.º 1
0
        //private YAEntity _entity = null;

        protected override void OnEnter()
        {
            DestroySelf(); //设置成自动销毁,每次重新生成
            //_entity = GetBusinessEntity() as YAEntity;

            TransResult       res     = TransResult.E_RECV_FAIL;
            CYATrafficInquiry inquiry = new CYATrafficInquiry();

            res = SyncTransaction(inquiry);
            if (res == TransResult.E_SUCC)
            {
                StartActivity("雅安交警认罚信息");
            }
            else if (res == TransResult.E_HOST_FAIL)
            {
                ShowMessageAndGotoMain(inquiry.ReturnCode + "-" + inquiry.ReturnMessage);
            }
            else if (res == TransResult.E_RECV_FAIL)
            {
                ShowMessageAndGotoMain("交易超时,请重试");
            }
            else
            {
                ShowMessageAndGotoMain("交易失败,请重试");
            }
        }
Ejemplo n.º 2
0
 private void RefreshMainData()
 {
     if (_dicMain.ContainsKey(_entity.CurrentIndex))
     {
         _entity.InquiryInfo = _dicMain[_entity.CurrentIndex];
         ShowMainData();
     }
     else
     {
         ShowProcess(true);
         TransResult       res     = TransResult.E_RECV_FAIL;
         CYATrafficInquiry inquiry = new CYATrafficInquiry();
         res = SyncTransaction(inquiry);
         if (res == TransResult.E_SUCC)
         {
             _dicMain.Add(_entity.CurrentIndex, _entity.InquiryInfo);
             ShowProcess(false);
             ShowMainData();
         }
         else if (res == TransResult.E_HOST_FAIL)
         {
             ShowProcess(false);
             ShowErrMsg(true, inquiry.ReturnCode + "-" + inquiry.ReturnMessage);
         }
         else if (res == TransResult.E_RECV_FAIL)
         {
             ShowProcess(false);
             ShowErrMsg(true, "查询超时,请重试");
         }
         else
         {
             ShowProcess(false);
             ShowErrMsg(true, "查询失败,请重试");
         }
     }
 }