Ejemplo n.º 1
0
        /// <summary>
        /// 广电查询
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public BroadCasQueryInfo BroadCasQuery(BroadCasQueryParam param)
        {
            Dictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("authcode", param.authcode);
            parameters.Add("trandateTime", param.trandateTime);
            parameters.Add("servicename", param.servicename);
            parameters.Add("reqsn", param.reqsn);
            parameters.Add("loginId", param.loginId);
            parameters.Add("paymentno", param.paymentno);
            string jsonText = null;
            int    count    = 2;

            for (int i = 1; i <= count; i++)
            {
                jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("BroadCasQueryName"), parameters, null);
                if (jsonText == null)
                {
                    continue;
                }
                break;
            }
            //反序列化JSON字符串,将JSON字符串转换成LIST列表
            return(JsonConvert.DeserializeObject <BroadCasQueryInfo>(jsonText));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 广电查询
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        public static BroadCasQueryInfo query(string account)
        {
            BroadCasInterface  access = new BroadCasInterface();
            BroadCasQueryParam param  = new BroadCasQueryParam();

            SysBLL.Authcode    = BroadCasLogin();
            param.authcode     = SysBLL.Authcode;
            param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime();
            param.servicename  = "GD001";
            param.reqsn        = SysBLL.getSerialNum();
            param.loginId      = SysBLL.getCpuNo(); //设备ID
            param.paymentno    = account;
            return(access.BroadCasQuery(param));
        }