Пример #1
0
 //修改密码
 private void updatePwd()
 {
     try
     {
         step2.Dispatcher.Invoke(new setTextBlockDelegate(setTextBlock), step2, "修改密码");
         step3.Dispatcher.Invoke(new setTextBlockDelegate(setTextBlock), step3, "核对密码");
         WintopUpdateWtPwdInfo info = WintopAccess.updateWtPwd(Payment.wintopReChargeParam.WintopUpdateWtPwdParam);
         if ("0000".Equals(info.msgrsp.retcode))
         {
             showInfo(info.msgrsp.retshow);
             //img1.Dispatcher.Invoke(new setImageImgDelegate(setImageImg), img1, succcesImage);
         }
         else
         {
             if (info.msgrsp.retshow.Length != 0)
             {
                 showInfo(info.msgrsp.retshow);
             }
             else
             {
                 showInfo("修改失败,请稍后再试...");
             }
             //img1.Dispatcher.Invoke(new setImageImgDelegate(setImageImg), img1, errorImage);
         }
     }
     catch (ThreadAbortException ae) { log.Write("error:FormCitizenStepLoad:" + ae.Message); }
     catch (Exception ex)
     {
         log.Write("error:FormCitizenStepLoad:updatePwd():" + ex.Message);
         showInfo("修改失败,请稍后再试...");
         //img1.Dispatcher.Invoke(new setImageImgDelegate(setImageImg), img1, errorImage);
     }
 }
Пример #2
0
 /// <summary>
 /// 挂失
 /// </summary>
 private void lossReport()
 {
     try {
         step2.Dispatcher.Invoke(new setTextBlockDelegate(setTextBlock), step2, "挂失");
         step3.Dispatcher.Invoke(new setTextBlockDelegate(setTextBlock), step3, "验证");
         WintopLossReportInfo info = WintopAccess.LossReport(Payment.wintopReChargeParam.WintopLossReportParam);
         if ("0000".Equals(info.msgrsp.retcode))
         {
             showInfo("挂失成功");
             //img1.Dispatcher.Invoke(new setImageImgDelegate(setImageImg),img1,succcesImage);
         }
         else
         {
             if (info.msgrsp.retshow.Length != 0)
             {
                 showInfo(info.msgrsp.retshow);
             }
             else
             {
                 showInfo("万通卡挂失失败");
             }
             //img1.Dispatcher.Invoke(new setImageImgDelegate(setImageImg), img1, errorImage);
         }
     }
     catch (ThreadAbortException ae) { log.Write("error:FormCitizenStepLoad:" + ae.Message); }
     catch (Exception ex)
     {
         log.Write("error:FormCitizenStepLoad:lossReport():" + ex.Message);
         showInfo("万通卡挂失失败");
         //img1.Dispatcher.Invoke(new setImageImgDelegate(setImageImg), img1, errorImage);
     }
 }
Пример #3
0
 private void orderInfo(ref WintopOrderInfo orderinfo, PayParam p)
 {
     log.Write("发起订单:甘肃一卡通卡号:" + Payment.wintopReChargeParam.WtCardNo + ",充值金额:" + Payment.wintopReChargeParam.UserInputMoney);
     Payment.wintopReChargeParam.ShopType = PayAccess.isWtLkl(p.icParams);
     orderinfo = WintopAccess.WintopOrder(Payment.wintopReChargeParam);
     if ("9999".Equals(orderinfo.msgrsp.retcode))
     {
         return;
     }
     if ("1234".Equals(orderinfo.msgrsp.retcode))
     {
         return;
     }
     if (!"0000".Equals(orderinfo.msgrsp.retcode))
     {
         return;
     }
     //获取商户号
     p.MERCHANTNO_shopNo = orderinfo.msgrsp.MERCHANTNO;
     //获取终端号
     p.TERMINALNO_clientNo = orderinfo.msgrsp.TERMINALNO;
     //交易金额
     p.rechageAmount = Payment.wintopReChargeParam.WintopDiscountInfoMsgrspList.CZ00030;
     //订单号
     p.orderNo = orderinfo.msgrsp.orderNo;
     Payment.wintopReChargeParam.RechageAmount   = Payment.wintopReChargeParam.WintopDiscountInfoMsgrspList.CZ00030;
     Payment.wintopReChargeParam.WintopOrderInfo = orderinfo;
     log.Write("订单提交成功:订单号:" + orderinfo.msgrsp.orderNo);
 }
Пример #4
0
 void read()
 {
     while (true)
     {
         try
         {
             Thread.Sleep(300);
             if (isCloseForm)
             {
                 return;
             }
             wtCard = wt.GetCardNoByBusReader();
             if (wtCard == null)
             {
                 continue;
             }
             if (wtCard.Length == 16)
             {
                 Payment.wintopReChargeParam.WtCardNo = wtCard;
                 if (isCloseForm)
                 {
                     return;
                 }
                 PrintInfo("正在读取,请稍后...");
                 WintopStatusInfo statusInfo = new WintopAccess().queryCardStatus(wtCard);
                 if ((statusInfo.msgrsp.WTSTATE == null) || (statusInfo.msgrsp.WTSTATE.Equals("")))
                 {
                     PrintInfo("业务正忙,请稍后再试");
                     return;
                 }
                 if (!"01".Equals(statusInfo.msgrsp.WTSTATE))
                 {
                     PrintInfo("该卡已挂失,无法正常使用");
                     return;//
                 }//
                 Util.JumpUtil.jumpCommonPage("FormCitizenStep");
                 return;
             }
             else
             {
                 continue;
             }
         }
         catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); }
         catch (Exception ex)
         {
             log.Write("error:读取万通卡异常:" + ex.Message);
             continue;
         }
     }
 }
Пример #5
0
 //查询
 private void query(int pageNo)
 {
     try
     {
         resultInfo("正在查询,请稍后...");
         isQuery = true;
         //清空面板
         clear();
         discountList = null;
         WintopAccess accexss = new WintopAccess();
         discountList = accexss.queryDiscount(Payment.wintopReChargeParam.WtCardNo);
         try
         {
             showInfo1.Dispatcher.Invoke(new setTextBlockDelegate(setTextBlock), showInfo1, accexss.findHintSpec().msg);
         }catch (Exception ex) { log.Write("error:query:" + ex.Message); }
         if (!"0000".Equals(discountList.msgrsp.retcode))
         {
             resultInfo(discountList.msgrsp.retshow);
             return;
         }
         if (discountList.msgrsp.RECHARGEINFO.Count == 0)
         {
             resultInfo("无优惠信息");
             return;
         }
         setPage(pageNo);
         resultInfo("请选择充值金额:");
         return;
     }
     catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); }
     catch (Exception ex)
     {
         resultInfo("无优惠信息");
         log.Write("error:FormRegistrationDepartment_2:query():" + ex.Message);
     }
     finally
     {
         resultInfo("请选择充值金额:");
         isQuery = false;
     }
 }
 private void load()
 {
     try
     {
         SysBLL.Player("请输入验证码.wav");
         inputBox.Text    = "";
         keyboard.textBox = inputBox;
         param            = null;
         param            = new WintopSendValidateCodeParam();
         param.Wtcardid   = Payment.wintopReChargeParam.WtCardNo;
         if (sendThread != null)
         {
             sendThread.Abort();
             sendThread.DisableComObjectEagerCleanup();
         }
         sendThread = new Thread(delegate() { WintopAccess.sendValidateCode(param); });
         sendThread.Start();
     }
     catch (Exception ex)
     {
         log.Write("error:FormCitizenStepValidatecode_1:load():" + ex.Message);
     }
 }
Пример #7
0
 private void readCard()
 {
     try
     {
         Thread.Sleep(1500);
         //等待用户插卡
         MachCardBLL.waitCard();
     }
     catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); }
     catch (Exception ex)
     {
         log.Write("error:插卡页readCard():" + ex.Message);
     }
     while (true)
     {
         try
         {
             Thread.Sleep(700);
             //卡机内是否有卡
             if (!MachCardBLL.CardUsable())
             {
                 continue;
             }
             PrintInfo("正在读卡,请稍后...");
             Thread.Sleep(1500);
         }
         catch (ThreadAbortException ae) { log.Write("error:" + ae.Message); }
         catch (Exception ex)
         {
             log.Write("error:插卡页readCard():" + ex.Message);
         }
         try
         {
             //签到
             PayAccess.ReadSign();
             string wtNo = wt.GetCardNo();
             if (wtNo != null)
             {
                 if (wtNo.Length == 16)
                 {
                     if (SysBLL.payCostType == 3)
                     {
                         //退卡
                         MachCardBLL.backCard();
                         //等待用户插卡
                         MachCardBLL.waitCard();
                         PrintInfo("暂不支持此卡,请取卡");
                         return;
                     }
                     else
                     {
                         SysBLL.payCardType = 1;
                         SysBLL.payCardNo   = wtNo;
                         if (!pwdBLL.SetCryptMode(1))
                         {
                             throw new Exception("系统异常,请稍后再试...");                        //万通卡加密方式
                         }
                         pwdBLL.closeKey();
                         //pwdBLL.OpenKeyboard(SysConfigHelper.readerNode("ZT598Port"), "9600", wtNo);
                         if (!setPayParam(wtNo, null, wtNo))
                         {
                             //PrintInfo("业务异常,请稍后再试...");
                             //退卡
                             MachCardBLL.backCard();
                             //等待用户插卡
                             MachCardBLL.waitCard();
                             return;
                         }
                         ;
                         SysBLL.payTypeName = "甘肃一卡通";
                         WintopStatusInfo statusInfo = new WintopAccess().queryCardStatus(wtNo);
                         if ((statusInfo.msgrsp.WTSTATE == null) || (statusInfo.msgrsp.WTSTATE.Equals("")))
                         {
                             PrintInfo("业务正忙,请稍后再试");
                             //退卡
                             MachCardBLL.backCard();
                             //等待用户插卡
                             MachCardBLL.waitCard();
                             return;
                         }
                         if ("01".Equals(statusInfo.msgrsp.WTSTATE))
                         {
                             //执行下一步操作
                             this.Dispatcher.Invoke(new Action(() => { Util.JumpUtil.jumpCommonPage("FormInputPassword"); }));
                             return;
                         }
                         else
                         {
                             PrintInfo("该卡已挂失,无法正常使用");
                             //退卡
                             MachCardBLL.backCard();
                             //等待用户插卡
                             MachCardBLL.waitCard();
                             return;
                         }
                     }
                 }
             }
             dictionary = null;
             //银行卡
             dictionary = BankBLL.ReadBankCard();
             SysBLL.IcBankDictionary = dictionary;
             //if (SysBLL.payCostType == 3)
             //{
             SysBLL.payCardType = 0;
             SysBLL.payCardNo   = dictionary["cardNo"];
             if (!pwdBLL.SetCryptMode(0))
             {
                 throw new Exception("系统异常,请稍后再试...");                         //拉卡拉加密方式
             }
             pwdBLL.closeKey();
             //pwdBLL.OpenKeyboard(SysConfigHelper.readerNode("ZT598Port"), "9600", dictionary["cardNo"]);
             //if (!setPayParam("", dictionary, dictionary["cardNo"])) throw new Exception("查询失败");
             if (!setPayParam("", dictionary, dictionary["cardNo"]))
             {
                 return;
             }
             ;
             SysBLL.payTypeName = "银行卡";
             this.Dispatcher.Invoke(new Action(() => { Util.JumpUtil.jumpCommonPage("FormInputPassword"); }));
             return;
             //}
             //else
             //{
             //    //退卡
             //    MachCardBLL.backCard();
             //    //等待用户插卡
             //    MachCardBLL.waitCard();
             //    PrintInfo("暂不支持此卡,请取卡");
             //}
         }
         catch (ThreadAbortException ae)
         {
             log.Write("error:读卡失败:" + ae.Message);
             return;
         }catch (WtException we)
         {
             log.Write("error:读卡异常");
             PrintInfo("读取失败");
             //退卡
             MachCardBLL.backCard();
             //等待用户插卡
             MachCardBLL.waitCard();
         }
         catch (Exception ex)
         {
             log.Write("error:读卡异常:" + ex.Message);
             PrintInfo("读取失败");
             //退卡
             MachCardBLL.backCard();
             //等待用户插卡
             MachCardBLL.waitCard();
         }
         finally
         {
             //btnOkBg.Enabled = true;
         }
     }
 }
 //查询
 public void query(string pageNo, string pageSize)
 {
     try
     {
         page++;
         if (page >= totalPage)
         {
             page = totalPage;
             setPage(page);
             return;
         }
         if (page < pageCount)
         {
             setPage(page);
             return;
         }
         page--;
         loadlbl.Dispatcher.Invoke(new setShowLabelDelegate(setShowLabel), loadlbl, true);
         printInfo("正在查询,请稍后...");
         isQuery             = false;
         queryParam          = new WintopSpendDetailParam();
         queryParam.Wtcardid = Payment.wintopReChargeParam.WtCardNo;
         queryParam.Password = Payment.wintopReChargeParam.Md5Pwd;
         queryParam.PageNo   = pageNo;
         queryParam.PageSize = pageSize;
         WintopSpendDetailInfo info = WintopAccess.SpendDetail(queryParam);
         if (!"0000".Equals(info.msgrsp.retcode))
         {
             //激活按钮
             if (info.msgrsp.retshow.Length > 0)
             {
                 printInfo(info.msgrsp.retshow);
                 return;
             }
             else
             {
                 printInfo("查询失败,请稍后再试");
                 return;
             }
         }
         if (info.msgrsp.wTConsumeInfo.Count > 0)
         {
             xianshi();
             printInfo("您的账单信息");
             if (list == null)
             {
                 list = new List <WintopSpendDetailInfoMsgwTConsumeInfo>();
             }
             list.AddRange(info.msgrsp.wTConsumeInfo);
             totalPage = Convert.ToInt32(info.msgrsp.totalPage);
             pageCount = list.Count / 3;
             if ((list.Count % 3) != 0)
             {
                 pageCount++;
             }
             page++;
             setPage(page);
             lbltoalCount.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), lbltoalCount, "共" + info.msgrsp.totalCount + "条记录");
             button4.Dispatcher.Invoke(new setShowButtonDelegate(setShowButton), button4, true);
             button3.Dispatcher.Invoke(new setShowButtonDelegate(setShowButton), button3, true);
         }
     }
     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
     {
         isQuery = true;
         loadlbl.Dispatcher.Invoke(new setShowLabelDelegate(setShowLabel), loadlbl, false);
     }
 }
Пример #9
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);
            }
        }