private void read() { try { isRead = false; PrintInfo("读取中,请稍后..."); SysBLL.Player("读取中.wav"); //测试 //string cardNo = BeiAnGGCardBLL.readCard(); string cardNo = "10007100"; if ((cardNo.Trim().Length == 0) || ("000000".Equals(cardNo.Trim()))) { throw new Exception("读取失败..."); } Payment.propPayTempParam.AccountNo = cardNo; Util.JumpUtil.jumpCommonPage("FormPropStepTemp02"); return; } catch (ThreadAbortException ae) { log.Write("error:金卡读卡异常:" + ae.Message); } catch (WtException e) { PrintInfo("本卡暂不支持此小区"); } catch (Exception e) { String msg = WtException.formatMsg(WtExceptionCode.Card.UNION_READ_CARD, e.Message); PrintInfo("本卡暂不支持此小区"); } finally { isRead = true; } }
private void read() { try { isRead = false; PrintInfo("读取中,请稍后..."); SysBLL.Player("读取中.wav"); XianfengBLL xfCard = new XianfengBLL(); GasCard card = (GasCard)(xfCard.getCardInfo(null)); string cardNo = card.CardNo; card.cardType = 2; Payment.GasPayParam.GasCard = card; GasInterface gasInterface = new GasInterface(); SysBLL.Authcode = gasInterface.GasLogin(); //执行下一步 //new FormJump().openForm(senderLoad, eLoad, this, new FormGasGoldenCardStep3(card)); ConfigSysParam.gifBusiness = GifBusiness.gas_IC; Util.JumpUtil.jumpCommonPage("FormGasGoldenCardStep03"); return; } catch (ThreadAbortException ae) { } catch (WtException e) { PrintInfo("读取失败,请重试..."); } catch (Exception e) { String msg = WtException.formatMsg(WtExceptionCode.Card.UNION_READ_CARD, e.Message); PrintInfo("读取失败,请重试..."); } finally { isRead = true; } }
//查询广电 public void query() { try { BroadCasQueryInfo info = BroadCasAccess.query(Payment.broadCasPayParam.Account); if (!"0000".Equals(info.msgrsp.retcode)) { //隐藏加载按钮 loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), this.loadlbl, false); if (info.msgrsp.retshow.Length > 0) { //显示提示信息 lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.lblAccountInfo, info.msgrsp.retshow); return; } else { lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.lblAccountInfo, "查询失败,请稍后再试"); return; } } PrintInfo("您的账单信息"); list = info.msgrsp.guangDianData; //账户名称 lblBalance.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.lblBalance, list.CUSTNAME); //账单余额 if (Convert.ToDouble(list.BANLANCE) >= 0) { lblAmountText.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAmountText, "账户余额"); } else { lblAmountText.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAmountText, "欠费金额"); } string price = list.BANLANCE; lblAmount.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.lblAmount, price); lblPayMentAmout.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.lblPayMentAmout, list.PAYMENTAMOUNT); btnRecharge.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton), this.btnRecharge, true); panel12.Dispatcher.Invoke(new isShowGridDelegate(isShowGrid), this.panel12, true); SysBLL.Player("继续缴费请点击确定按钮.wav"); } catch (ThreadAbortException ae) { } catch (WtException e) { PrintInfo(e); } catch (Exception e) { //弹出异常提示页面 string msg = WtException.formatMsg(WtExceptionCode.Bus.BUS_QUERY, e.Message);//异常信息 PrintInfo(msg); } finally { } }
private void PrintInfo(WtException e) { PrintInfo(e.getMsg()); }
public void query() { try { ElecQueryElecInfo info = ElecAccess.QueryElec(Payment.elecPayParam.Account); loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), loadlbl, false); try { //ElecQueryUserInfo userInfo = ElecAccess.QueryUser(Payment.elecPayParam.Account); //address = userInfo.msgrsp.userInfoList[0].yddz; address = info.msgrsp.yddz; addresslbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.addresslbl, info.msgrsp.yddz); if (address.Length > 10) { // timer1.Enabled = true; } } catch (Exception ex) { } if (!"0000".Equals(info.msgrsp.retcode)) { //欠费 if ("0001".Equals(info.msgrsp.retcode)) { btnRecharg.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton), btnRecharg, true); //提示 lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "查询无欠费,可进行预收"); //电费账号 lblBalance.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblBalance, Payment.elecPayParam.Account); yonhumingchengLbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), yonhumingchengLbl, info.msgrsp.yhmc); if (info.msgrsp.ysje != null) { if (info.msgrsp.ysje.Length > 0) { lblAmount.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAmount, info.msgrsp.ysje); } else { lblAmount.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAmount, "0.0"); } } //if (info.msgrsp.qfje != null) //{ // //欠费金额 // if (info.msgrsp.qfje.Length > 0) // qfjeLbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), qfjeLbl, info.msgrsp.qfje); // else // qfjeLbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), qfjeLbl, "0.0"); //} Payment.elecPayParam.IsArrearage = true; //Payment.elecPayParam.Account = Payment.elecPayParam.Account; //btnRecharg.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton),btnRecharg,true); panel4.Dispatcher.Invoke(new isShowGridDelegate(isShowGrid), panel4, true); try { rollingThread = new Thread(delegate() { rolling(); }); rollingThread.Start(); }catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); } catch (Exception ex) { log.Write("error:电力查询信息滚动异常:" + ex.Message); } SysBLL.Player("继续缴费请点击确定按钮.wav"); return; } else if (!"0000".Equals(info.msgrsp.retcode)) { loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), this.loadlbl, false); //激活按钮 btnRecharg.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton), this.btnRecharg, false); if (info.msgrsp.retshow.Length > 0) { lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, info.msgrsp.retshow); return; } else { lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "查询失败,请稍后再试"); return; } } else if (info.msgrsp.retshow != null) { if (info.msgrsp.retshow == null) { info.msgrsp.retshow = ""; } string retshow = SysBLL.ClearBlank(info.msgrsp.retshow); if (retshow.Length <= 15) { //提示 lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, retshow); loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), this.loadlbl, false); return; } } else { PrintInfo(WtException.formatMsg(WtExceptionCode.Bus.BUS_QUERY)); } } if (info.msgrsp.dfze != null) { btnRecharg.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton), btnRecharg, false); //提示 lblAccountInfo.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lblAccountInfo, "您的账号信息"); loadlbl.Dispatcher.Invoke(new isShowLabelDelegate(isShowLabel), this.loadlbl, false); ////电费账号 //lblBalance.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText)Text = account; yonhumingcheng = info.msgrsp.yhmc; ////余额 //if (info.msgrsp.ysje.Length > 0) // lblAmount.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText)Text = info.msgrsp.ysje; //else // lblAmount.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText)Text = "0.0"; ////欠费金额 //if (info.msgrsp.qfje.Length > 0) // qfjeLbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText)Text = info.msgrsp.qfje; //else // qfjeLbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText)Text = "0.0"; panel2.Dispatcher.Invoke(new isShowGridDelegate(isShowGrid), panel2, true); //btnRecharg.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton),btnRecharg,true); //Payment.elecPayParam.UserInputAmount = info.msgrsp.qfje; //Payment.elecPayParam.Account = Payment.elecPayParam.Account; //获取支付参数 Payment.elecPayParam.Param = new ElecPayresParam(); Payment.elecPayParam.Param.dzpc = info.msgrsp.dzpc; Payment.elecPayParam.Param.yhbh = info.msgrsp.yhbh; Payment.elecPayParam.Param.ysje = info.msgrsp.ysje; Payment.elecPayParam.Param.jfbs = info.msgrsp.dfbs; list = info.msgrsp.dianFeiDetail; if (list.Count > 0) { string str = ""; for (int i = 0; i < list.Count; i++) { str = list[i].yhbh + "-" + list[i].ysbz + "-" + list[i].bbyjje + "-" + list[i].dfje + "-" + list[i].wyjje + "-" + list[i].sctw + "-" + list[i].bctw + "|"; jfmx = jfmx + str; } jfmx = jfmx.Remove(jfmx.Length - 1, 1); } pushlist(); pagelbl.Dispatcher.Invoke(new isShowTextBlockDelegate(isShowTextBlock), pagelbl, true); //激活按钮 //btnRecharg.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton),btnRecharg,true); btnRecharg.Dispatcher.Invoke(new isShowButtonDelegate(isShowButton), btnRecharg, false); SysBLL.Player("继续缴费请点击充值按钮.wav"); return; } } catch (ThreadAbortException ae) { log.Write("error:FormElectricStep02:query():" + ae.Message); } catch (WtException ex) { if (ex.getCode() == WtExceptionCode.Sys.NETWORK) { PrintInfo(WtException.formatMsg(WtExceptionCode.Bus.BUS_QUERY, ex.Message)); } else { PrintInfo(ex); } } catch (Exception e) { PrintInfo(WtException.formatMsg(WtExceptionCode.Bus.BUS_QUERY, e.Message)); } }
public static void PrintInfo(WtException e, Label label, PictureBox box) { PrintInfo(e.getMsg(), label, box); }
public static void PrintInfo(WtException e, Label label) { PrintInfo(e, label, null); }
//查询 private void query() { try { //显示图片 this.loadlbl.Dispatcher.Invoke(new isShowLableDelegate(isShowLable), this.loadlbl, true); MobileQueryInfo info = MobileAccess.query(Payment.mobilePayParam.PhoneOn); if (!"0000".Equals(info.msgrsp.retcode)) { if (info.msgrsp.retshow.Length > 0) { this.showInfoTxt.Dispatcher.Invoke(new showInfoDelegate(setShowInfo), info.msgrsp.retshow); return; } else { this.showInfoTxt.Dispatcher.Invoke(new showInfoDelegate(setShowInfo), "查询失败,请稍后再试"); return; } } Payment.mobilePayParam.QueryInfo = info; //格式金额,小数 double amout = 0; double price = 0; amout = Convert.ToDouble(info.msgrsp.prepaidBalance); price = Convert.ToDouble(info.msgrsp.payableAmout); amout = amout / 100; price = price / 100; //显示电话号码 this.lblBalance.Dispatcher.Invoke(new balanceDelegate(setBalanceText), Payment.mobilePayParam.PhoneOn); //显示余额 this.lblAmount.Dispatcher.Invoke(new amountDelegate(setAmountText), amout.ToString()); //显示欠费金额 this.overdueMoneyLbl.Dispatcher.Invoke(new overdueMoneyDelegate(setOverdueMoneyText), price.ToString()); //显示面板 panel.Dispatcher.Invoke(new panelShowDelegate(setPanelVisibility), true); //显示充值按钮 this.OkBtn.Dispatcher.Invoke(new isShowBtnDelegate(setBtnVisibility), OkBtn, true); //提示信息 this.showInfoTxt.Dispatcher.Invoke(new showInfoDelegate(setShowInfo), "您的话费信息"); SysBLL.Player("继续缴费请点击确定按钮.wav"); } catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); } catch (WtException wte) { //异常处理 if (wte.getCode() == WtExceptionCode.Sys.NETWORK) { this.showInfoTxt.Dispatcher.Invoke(new showInfoDelegate(setShowInfo), WtException.formatMsg(WtExceptionCode.Sys.NETWORK) + wte.Message); } else { this.showInfoTxt.Dispatcher.Invoke(new showInfoDelegate(setShowInfo), WtException.formatMsg(WtExceptionCode.Bus.BUS_QUERY) + wte.Message); } } catch (Exception e) { this.showInfoTxt.Dispatcher.Invoke(new showInfoDelegate(setShowInfo), "查询失败,请稍后再试"); log.Write("error:FormMobileStep02:query():" + e.Message); } finally { //隐藏加载图片 this.loadlbl.Dispatcher.Invoke(new isShowLableDelegate(isShowLable), this.loadlbl, false); } }