예제 #1
0
 public void query()
 {
     try
     {
         ParkingLotQueryInfo info = PropAccess.ParkingLotQuery(Payment.PropPayParam.Mobile);
         if (!"0000".Equals(info.msgrsp.retcode))
         {
             //激活按钮
             //btnRecharge.Enabled = true;
             if (info.msgrsp.retshow.Length > 0)
             {
                 setTextBlock(lblAccountInfo, info.msgrsp.retshow);
                 return;
             }
             else
             {
                 setTextBlock(lblAccountInfo, "查询失败,请稍后再试");
                 return;
             }
         }
         if (info.msgrsp.wyDataParkList.Count > 0)
         {
             xianshi();
             setTextBlock(lblAccountInfo, "您的车位信息");
             list      = info.msgrsp.wyDataParkList;
             pageCount = list.Count / 3;
             if (list.Count <= 3)
             {
                 pageCount = 0;
             }
             if ((list.Count % 3) != 0)
             {
                 pageCount++;
             }
             setPage(page);
             pagedn.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton), pagedn, true);
             pageup.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton), pageup, true);
         }
     }
     catch (ThreadAbortException ae) { }
     catch (Exception e)
     {
         setTextBlock(lblAccountInfo, "查询失败...");
     }
     finally
     {
         loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), loadlbl, false);
     }
 }
예제 #2
0
        /// <summary>
        /// 车位查询
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public ParkingLotQueryInfo ParkingLotQuery(ParkingLotQueryParam param)
        {
            Dictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("authcode", param.authcode);         // 认证码 not null
            parameters.Add("servicename", param.servicename);   // 交易号 not null
            parameters.Add("trandateTime", param.trandateTime); // 交易时间  格式:YYYYMMDDHHMMSS
            parameters.Add("reqsn", param.reqsn);               // 请求流水号 not null
            parameters.Add("loginId", param.loginId);           // 交互终端的设备编号(用于自助终端)
            parameters.Add("mobile", param.mobile);             //
            string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("PropParkingLotQuery"), parameters, null);

            log.Write("物业车位json:" + jsonText);
            //反序列化JSON字符串,将JSON字符串转换成LIST列表
            ParkingLotQueryInfo info = JsonConvert.DeserializeObject <ParkingLotQueryInfo>(jsonText);

            return(info);
        }