Ejemplo n.º 1
0
        private void load()
        {
            try {
                SysBLL.Player("正在查询.wav");
                result01        = null;
                result02        = null;
                result03        = null;
                list            = null;
                wintopQueryInfo = null;
                visble();
                lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "正在查询,请稍后...");
                //显示正在加载中
                loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), this.loadlbl, true);
                queryThread = new Thread(delegate() { query(); });
                queryThread.Start();

                timerLoad          = new DispatcherTimer();
                timerLoad.Interval = TimeSpan.FromMilliseconds(400);
                timerLoad.Tick    += new EventHandler(timer_Tick);
                timerLoad.Start();
            }
            catch (Exception ex)
            {
                log.Write("error:FormCitizenStep03:load():" + ex.Message);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 万通卡查询
        /// </summary>
        /// <param name="wtCardNo"></param>
        /// <returns></returns>
        public static WintopQueryInfo WintopQuery(string wtCardNo)
        {
            SysBLL.Authcode = WintopLogin();
            WintopQueryInfo info = null;
            //万通卡查询
            WintopInterface  access = new WintopInterface();
            WintopQueryparam param  = new WintopQueryparam();

            param.authcode     = SysBLL.Authcode;                // 认证码 not null
            param.servicename  = "WT001";                        //交易号 not null
            param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); //交易时间  格式:YYYYMMDDHHMMSS
            param.resqn        = SysBLL.getSerialNum();          //请求流水号 not null
            param.paymentno    = wtCardNo;                       //缴费户号 not null
            param.loginId      = SysBLL.getCpuNo();              //设备ID
            param.md5Pwd       = Payment.wintopReChargeParam.Md5Pwd;
            info = access.WintopQuery(param);
            return(info);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 万通卡查询
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public WintopQueryInfo WintopQuery(WintopQueryparam param)
        {
            WintopQueryInfo             wintopQueryInfo = null;
            Dictionary <String, String> parameters      = new Dictionary <String, String>();

            parameters.Add("authcode", param.authcode);
            parameters.Add("servicename", param.servicename);
            parameters.Add("trandateTime", param.trandateTime);
            parameters.Add("reqsn", param.resqn);
            parameters.Add("paymentno", param.paymentno);
            parameters.Add("loginId", param.loginId);
            parameters.Add("password", param.md5Pwd);

            string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("WintopQueryName"), parameters, null);

            //反序列化JSON字符串,将JSON字符串转换成LIST列表
            wintopQueryInfo = JsonConvert.DeserializeObject <WintopQueryInfo>(jsonText);

            return(wintopQueryInfo);
        }
Ejemplo n.º 4
0
        void query()
        {
            try
            {
                wintopQueryInfo = WintopAccess.WintopQuery(Payment.wintopReChargeParam.WtCardNo);

                if (!"0000".Equals(wintopQueryInfo.msgrsp.retcode))
                {
                    //pictureBox4.Visible = false;
                    if (wintopQueryInfo.msgrsp.retshow.Length > 0)
                    {
                        lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, wintopQueryInfo.msgrsp.retshow);
                        return;
                    }
                    else
                    {
                        lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "查询失败,请稍后再试");
                        return;
                    }
                }

                if (wintopQueryInfo.msgrsp.wTCardInfoList.Count > 0)
                {
                    show();
                    list = wintopQueryInfo.msgrsp.wTCardInfoList;
                    for (int i = 0; i < list.Count; i++)
                    {
                        if ("01".Equals(list[i].TYPE))
                        {
                            USERID1.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), USERID1, list[i].WTCARDID);
                            AMOUNT1.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), AMOUNT1, list[i].AMOUNT);
                            result01 = list[i];
                        }
                        if ("02".Equals(list[i].TYPE))
                        {
                            USERID2.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), USERID2, list[i].WTCARDID);
                            AMOUNT2.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), AMOUNT2, list[i].AMOUNT);
                            result02 = list[i];
                        }

                        /*if ("03".Equals(list[i].TYPE))
                         * {
                         *  USERID3.Text = list[i].USERID;
                         *  AMOUNT3.Text = list[i].AMOUNT;
                         *  result03 = list[i];
                         *  button3.Enabled = true;
                         * }*/
                    }
                    lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "您的账号信息");
                    SysBLL.Player("继续缴费请点击充值按钮.wav");
                }
                else
                {
                    lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "没有记录");
                }
            }
            catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); }
            catch (WtException e)
            {
                lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, e.Message);
            }
            catch (Exception e)
            {
                lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "查询失败,请稍候再试...");
            }
            finally
            {
                //隐藏加载
                loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), this.loadlbl, false);
            }
        }