//查询水务 public void query() { try { loadlbl.Dispatcher.Invoke(new setShowLabelDelegate(setShowLabel), loadlbl, true); WaterQueryInfo info = WaterAccess.WaterQuery(Payment.waterPayParam.Account); if (!"0000".Equals(info.msgrsp.retcode)) { //激活按钮 if (info.msgrsp.retshow.Length > 0) { printInfo(info.msgrsp.retshow); return; } else { printInfo("查询失败,请稍后再试"); return; } } if (info.msgrsp.orderlist.Count > 0) { xianshi(); printInfo("您的账单信息"); list = info.msgrsp.orderlist; pageCount = list.Count / 3; if ((list.Count % 3) != 0) { pageCount++; } setPage(page); pagelbl.Dispatcher.Invoke(new setShowTextBlockDelegate(setShowTextBlock), pagelbl, true); button4.Dispatcher.Invoke(new setShowButtonDelegate(setShowButton), button4, true); button3.Dispatcher.Invoke(new setShowButtonDelegate(setShowButton), button3, true); SysBLL.Player("继续缴费请点击充值按钮.wav"); } } catch (ThreadAbortException ae) { log.Write("error:FormWaterStep02:query():" + ae.Message); printInfo("查询失败,请稍后再试"); } catch (WtException e) { printInfo(e.Message); } catch (Exception e) { log.Write("error:FormWaterStep02:query():" + e.Message); printInfo("查询失败,请稍后再试"); } finally { loadlbl.Dispatcher.Invoke(new setShowLabelDelegate(setShowLabel), loadlbl, false); } }
/// <summary> /// 查询水务 /// </summary> /// <param name="paymentno">户号</param> /// <returns></returns> public static WaterQueryInfo WaterQuery(string paymentno) { SysBLL.Authcode = WaterLogin(); WaterInterface access = new WaterInterface(); WaterQueryParam param = new WaterQueryParam(); WaterQueryInfo info = null; param.authcode = SysBLL.Authcode; // 认证码 not null param.servicename = "SW001"; //交易编号 not null param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); //交易时间 格式:YYYYMMDDHHMMSS param.reqsn = SysBLL.getSerialNum(); //请求流水号 not null param.paymentno = paymentno; //缴费户号 not null param.loginId = SysBLL.getCpuNo(); //交互终端的设备编号(用于自助终端) not null info = access.WaterQuery(param); return(info); }
private void Button_Click_3(object sender, RoutedEventArgs e) { List <WaterQueryOrderList> orderlist = new List <WaterQueryOrderList>(); orderlist.Add(new WaterQueryOrderList()); orderlist[0].custNo = custNo3; orderlist[0].custName = username3.Text; orderlist[0].billDate = date3.Text; orderlist[0].amout = price3.Text; WaterQueryInfo info = new WaterQueryInfo(); info.msgrsp = new WaterQueryMsgreq(); info.msgrsp.orderlist = orderlist; //new FormJump().openForm(sender, e, this, new FormWaterStep03(info)); Payment.waterPayParam.WaterQueryInfo = info; Util.JumpUtil.jumpCommonPage("FormWaterStep03"); }
/// <summary> /// 获取水务缴费信息 /// </summary> /// <param name="param"></param> /// <returns></returns> public WaterQueryInfo WaterQuery(WaterQueryParam param) { WaterQueryInfo waterQueryInfo = 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.reqsn); parameters.Add("paymentno", param.paymentno); parameters.Add("loginId", param.loginId); string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("WaterQueryName"), parameters, null); //反序列化JSON字符串,将JSON字符串转换成LIST列表 waterQueryInfo = JsonConvert.DeserializeObject <WaterQueryInfo>(jsonText); return(waterQueryInfo); }
private void load() { try { info = Payment.waterPayParam.WaterQueryInfo; this.pwd = Payment.waterPayParam.Pwd; payThread = new Thread(pay); payThread.Start(); timerLoad = new DispatcherTimer(); timerLoad.Interval = TimeSpan.FromMilliseconds(400); timerLoad.Tick += new EventHandler(timer_Tick); timerLoad.Start(); } catch (Exception ex) { log.Write("error:FormWaterStep06:load():" + ex.Message); } }