Beispiel #1
0
        protected override void OnEnter()
        {
            try
            {
                base.OnEnter();
                entity = (GetBusinessEntity() as DHRQPaymentEntity);
                //GetElementById("btnReturn").Style = "display: none";
                //GetElementById("btnHome").Style = "display: none";
                setComponnents("ComComponnents", true, false, false);
                //ReportSync("BeingRead");
                GetElementById("Message1").InnerText = "正在查询,请稍后... ...";

                if (ReadCardDeal() == 0)
                {
                    if (int.Parse(entity.cardinfo.iccSpare) > 0)
                    {
                        ShowMessageAndGotoMain("卡内有气|请先插表使用");
                    }
                    else
                    {
#if DEBUG
                        GotoNext();
#else
                        StartActivity("德化燃气正在协议查询");
#endif
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Error("[BeingReadGasCardDeal][OnEnter] error ", ex);
            }
        }
Beispiel #2
0
        protected override void OnEnter()
        {
            base.OnEnter();
            try
            {
                entity       = (GetBusinessEntity() as DHRQPaymentEntity);
                mSectionName = entity.SectionName;
                mId          = InputId;
                GetElementById(mId).Focus();
                //if (Esam.IsUse)
                //    mPinKey = KeyManager.GetEnPinKey(mSectionName);
                //else
                setComponnents("ComComponnents", true, false, false);

                mPinKey = KeyManager.GetDePinKey(mSectionName);
                Log.Info("InputPass mPinkey:" + Utility.bcd2str(mPinKey, mPinKey.Length));
                //if (Esam.IsUse)
                //{
                //    Esam.SetWorkmode(Esam.WorkMode.Default);
                //    Esam.SetKeyLen(mKeyLength);
                //    Esam.SetMasterkeyNo(mKeyIndex);
                //    SendMessage(INPUT_PASS);
                //}
                //pin = GetElementById("pin").GetAttribute("value");

                //GetElementById("ok").Click += new HtmlElementEventHandler(OKClick);
            }
            catch (Exception ex)
            {
                Log.Error("[InputPasswordDeal][OnEnter] err", ex);
            }
        }
Beispiel #3
0
        private void downLoadParams()
        {
            try
            {
                downLoadParamsRet = true;
                bool nopinret        = true;
                DHRQPaymentEntity ya = new DHRQPaymentEntity("DownLoadKey");
                if (ya.DownLoadAidAndCA)
                {
                    CDHRQDownAID yaAID = new CDHRQDownAID();
                    CDHRQDownCA  yaCA  = new CDHRQDownCA();
                    downLoadParamsRet   = yaCA.DownPublishCA() ? yaAID.DownAID() : false;//YA下载AID和CA
                    ya.DownLoadAidAndCA = !downLoadParamsRet;
                    if (!downLoadParamsRet)
                    {
                        return;
                    }
                }

                downLoadParamsRet = nopinret & downLoadParamsRet ? true : false;
            }
            catch (Exception ex)
            {
                Log.Error("init downLoadParams err", ex);
            }
        }
Beispiel #4
0
        protected override void OnEnter()
        {
            try
            {
                base.OnEnter();
                //GetElementById("btnReturn").Style = "display: none";
                //GetElementById("btnHome").Style = "display: none";
                setComponnents("ComComponnents", true, false, false);

                GetElementById("Message1").InnerHtml = "正在查询,请稍后... ...";
                entity = (GetBusinessEntity() as DHRQPaymentEntity);

                //entity.cardinfo.cardNo = "00016016";
                //entity.cardinfo.gasCount = "3";
                //entity.cardinfo.icMark = "123";
                //entity.cardinfo.icNum = "123";
                //entity.cardinfo.strEnCrypt = "78E17879773516BE7F372369BE61E24EE2DC1576190AB6C5487E53DF2E3110F9E0639DF33E671624487E53DF2E3110F9BD612DF3FA28C3148700861A52D99C04";
                //entity.cardinfo.cardType = "0";
                //entity.buyNums = 30.2;
                if (QueryMsgDeal() == 0)
                {
                    StartActivity("德化燃气燃气卡信息显示");
                }
                else
                {
                    ShowMessageAndGotoMain("查询失败|" + entity.returnCode + entity.returnMsg);
                }
            }
            catch (Exception ex)
            {
                Log.Error("[BeingQueryInfoDeal][OnEnter] error" + ex);
            }
        }
Beispiel #5
0
        protected override void OnEnter()
        {
            base.OnEnter();
            try
            {
                entity = (GetBusinessEntity() as DHRQPaymentEntity);
                setComponnents("ComComponnents", true, "btnHome", true, "btnReturn", true);

                //GetElementById("btnReturn").Click += new HtmlElementEventHandler(ReturnClick);
                //GetElementById("btnHome").Click += new HtmlElementEventHandler(HomeClick);
                //GetTestData();

                //GetElementById("btnPay").Click += new HtmlElementEventHandler(PayClick);
                CurrentPage = 1;
                TotalPage   = entity.detailinfolist.Count % MaxRow != 0 ? entity.detailinfolist.Count / MaxRow + 1 : entity.detailinfolist.Count / MaxRow;
                if (TotalPage > 1)
                {
                    GetElementById("firstpage").Style     = "visibility: block;";
                    GetElementById("lastpage").Style      = "visibility: block;";
                    GetElementById("nextpage").Style      = "visibility: block;";
                    GetElementById("previouspage").Style  = "visibility: block;";
                    GetElementById("firstpage").Click    += new HtmlElementEventHandler(FirstPageClick);
                    GetElementById("lastpage").Click     += new HtmlElementEventHandler(LastPageClick);
                    GetElementById("nextpage").Click     += new HtmlElementEventHandler(NextPageClick);
                    GetElementById("previouspage").Click += new HtmlElementEventHandler(PreviousPageClick);
                }
                else
                {
                    GetElementById("firstpage").Style    = "visibility: hidden;";
                    GetElementById("lastpage").Style     = "visibility: hidden;";
                    GetElementById("nextpage").Style     = "visibility: hidden;";
                    GetElementById("previouspage").Style = "visibility: hidden;";
                }

                DisPlayMsg();
                if (entity.cardinfo.cardType == "1")
                {
                    //购气
                    GetElementById("btnpay").SetAttribute("value", "购气");
                }
                else if (entity.cardinfo.cardType == "0")
                {
                    GetElementById("btnpay").SetAttribute("value", "充值");
                }
                else
                {
                    GetElementById("btnpay").Style = "visibility: hidden;";
                }
                GetElementById("btnpay").Click += new HtmlElementEventHandler(PayClick);
            }
            catch (NullReferenceException e)
            {
                Log.Error("[" + MethodBase.GetCurrentMethod().DeclaringType.Name + "][" + MethodBase.GetCurrentMethod().Name + "] err" + e);
            }
        }
Beispiel #6
0
        protected override void OnEnter()
        {
            base.OnEnter();
            try
            {
                entity = (GetBusinessEntity() as DHRQPaymentEntity);
                //GetElementById("btnReturn").Style = "display: block";
                //GetElementById("btnHome").Style = "display: block";
                setComponnents("ComComponnents", true, true, true);

                GetElementById("btnPay").Click += new HtmlElementEventHandler(PayClick);

                GetElementById("Username").InnerHtml  = entity.returnCardInfo.userName.Trim();
                GetElementById("gasCardNo").InnerHtml = entity.cardinfo.cardNo.Trim();
                if (entity.cardinfo.cardType == "0")
                {
                    GetElementById("gasCardType").InnerHtml = "工业卡";
                }
                else if (entity.cardinfo.cardType == "1")
                {
                    GetElementById("gasCardType").InnerHtml = "民用卡";
                }
                else if (entity.cardinfo.cardType == "2")
                {
                    GetElementById("gasCardType").InnerHtml = "商业卡";
                }
                else
                {
                    GetElementById("gasCardType").InnerHtml = "";
                }

                if (entity.cardinfo.cardType == "1")
                {
                    //充气
                    GetElementById("gasCardNumsOrAmountTitle").InnerText = "购买气量:";
                    GetElementById("gasCardNumsOrAmount").InnerText      = entity.buyNums.ToString() + "m³";
                }
                else if (entity.cardinfo.cardType == "0")
                {
                    GetElementById("gasCardNumsOrAmountTitle").InnerText = "购买金额:";
                    GetElementById("gasCardNumsOrAmount").InnerText      = CommonData.Amount + "元";
                }
                else
                {
                    GetElementById("gasCardNumsOrAmountTitle").InnerText = "";
                }
                GetElementById("totalAmount").InnerHtml = CommonData.Amount + "元";
                //CommonData.BankCardNum = entity.signBankCardNo;
            }
            catch (Exception ex)
            {
                Log.Error("[BeingReadGasCardDeal][OnEnter] error ", ex);
            }
        }
Beispiel #7
0
        protected override void OnEnter()
        {
            _entity = (DHRQPaymentEntity)GetBusinessEntity();
            _entity.initorderno();
            try
            {
                btncut      = GetElementById("btncut");
                btnPay      = GetElementById("Pay");
                btnplus     = GetElementById("btnplus");
                btnReturn   = GetElementById("Return");
                inputnumbg  = GetElementById("input");
                fare        = GetElementById("fare");
                totalAmount = GetElementById("totalAmount");
                ticketnum   = GetElementById("ticketnum");

                btnPay.Click    += new HtmlElementEventHandler(Pay_Click);
                btnReturn.Click += new HtmlElementEventHandler(Return_Click);
                btnplus.Click   += new HtmlElementEventHandler(btnplus_Click);
                btncut.Click    += new HtmlElementEventHandler(btncut_Click);

                inputnumbg.Click    += new HtmlElementEventHandler(InputClick);
                ticketnum.LostFocus += new HtmlElementEventHandler(ticketlostfocus);
                ticketnum.GotFocus  += new HtmlElementEventHandler(ticketgotfocus);
                ticketnum.KeyUp     += new HtmlElementEventHandler(ticketnumKeyUp);
                fare.InnerText       = _entity.TicketFare;

                ticketfare = double.Parse(_entity.TicketFare);
                if (_entity.TicketNums > 0)
                {
                    inputnumbg.Style    = "position: absolute; left: 39px; top: 246px; visibility:hidden";
                    ticketnum.InnerText = _entity.TicketNums.ToString();
                    ticketnums          = _entity.TicketNums;
                }
                else
                {
                    totalamount = 00.0;
                    ticketnums  = 0;
                }
                totalamount           = ticketfare * ticketnums;
                totalAmount.InnerText = totalamount.ToString();
                //StartActivity("重庆园博园正在打印");

                //PayProcess();
            }
            catch (Exception ex)
            {
                Log.Error("select ticket num err", ex);
            }
        }
Beispiel #8
0
        protected override void OnEnter()
        {
            base.OnEnter();
            setComponnents("ComComponnents", true, false, false);
            entity = (GetBusinessEntity() as DHRQPaymentEntity);
            //CardReader.CardOut();
            entity.isSign = false;

            if (CardReader.CardOut() != CardReader.Status.CARD_SUCC)
            {
                Log.Info("吐卡失败或无卡");
            }
            GetElementById("btnRead").Click += new HtmlElementEventHandler
                                                   (ChangeBankCardDeal_Click);
            //GetElementById("btnHome").Click += new HtmlElementEventHandler(HomeClick);
        }
Beispiel #9
0
        protected override void OnEnter()
        {
            base.OnEnter();
            entity = (GetBusinessEntity() as DHRQPaymentEntity);
            //GetElementById("btnReturn").Style = "display: none";
            //GetElementById("btnHome").Style = "display: none";
            setComponnents("ComComponnents", true, false, false);

            GetElementById("Message1").InnerText = "正在写燃气卡,请稍后... ...";
            int res = WriteCardDeal();

            if (res == 0)
            {
                //写卡成功,打印凭条
                if (ReceiptPrinter.ExistError())
                {
                    StartActivity("德化燃气成功界面");
                }
                //StartActivity("德化燃气正在写燃气卡");
                else
                {
                    StartActivity("德化燃气正在打印");
                }

                //StartActivity("正在打印");
            }
            else
            {
                //写卡出错,发起冲正
                //if (SyncTransaction(new CReverser_DHRQPaymentPay()) == TransResult.E_RECV_FAIL)
                //{
                //    ShowMessageAndGotoMain("交易失败!|交易超时,请重试");
                //    return;
                //}
                if (res == -1)
                {
                    Log.Error("写卡出错|程序出错");
                }
                else
                {
                    string strRes = entity.GetGasCardReaderRes(res);
                    Log.Error("写卡出错|" + strRes);
                }
                ShowMessageAndGotoMain("写卡出错|请联系燃气公司客服人员");
            }
        }
Beispiel #10
0
        protected override void OnEnter()
        {
            try
            {
                base.OnEnter();
                //GetElementById("btnReturn").Style = "display: none";
                //GetElementById("btnHome").Style = "display: none";
                setComponnents("ComComponnents", true, false, false);

                GetElementById("Message1").InnerHtml = "正在查询,请稍后... ...";
                entity = (GetBusinessEntity() as DHRQPaymentEntity);
                if (QueryMsgDeal() == 0)
                {
                    if (entity.cardinfo.cardType == "0")
                    {
                        //天信 充值
                        if (!entity.isSign)
                        {
                            ShowMessageAndGotoMain("此卡未签约|请到前台签约");
                            return;
                        }
                    }
                    StartActivity("德化燃气正在明细查询");
                    //#region V1.5.1
                    //if (entity.cardinfo.cardType == "1")
                    //{
                    //    //购气
                    //    StartActivity("德化燃气购气选择");
                    //}
                    //else if (entity.cardinfo.cardType == "0")
                    //{
                    //    StartActivity("德化燃气充值选择");
                    //}

                    //#endregion
                }
                else
                {
                    ShowMessageAndGotoMain("协议查询失败|" + entity.returnCode + entity.returnMsg);
                }
            }
            catch (Exception ex)
            {
                Log.Error("[BeingQueryInfoDeal][OnEnter] error" + ex);
            }
        }
Beispiel #11
0
        protected override void OnEnter()
        {
            base.OnEnter();
            try
            {
                entity = (GetBusinessEntity() as DHRQPaymentEntity);

                //GetElementById("btnReturn").Style = "display: block";
                //GetElementById("btnHome").Style = "display: block";
                setComponnents("ComComponnents", true, true, true);
                GetElementById("ok").Click += new HtmlElementEventHandler(OKClick);
                GetElementById("nums").Focus();
            }
            catch (Exception ex)
            {
                Log.Error("[BeingQueryInfoDeal][OnEnter] error" + ex);
            }
        }
Beispiel #12
0
        protected override void OnEnter()
        {
            base.OnEnter();
            DestroySelf();//设置成自动销毁,每次重新生成
            bemvInit  = false;
            bisICCard = false;
            entity    = (GetBusinessEntity() as DHRQPaymentEntity);
            //if (SyncTransaction(new CReverser_DHRQPaymentPay()) == TransResult.E_RECV_FAIL)
            //{
            //    ShowMessageAndGotoMain("交易失败!|交易超时,请重试");
            //    return;
            //}

            if (CommonData.UserCardType == UserBankCardType.ICCard ||
                CommonData.UserCardType == UserBankCardType.IcMagCard)
            {
                bisICCard = true;
            }

            entity.SendField55 = null;
            setComponnents("ComComponnents", true, false, false);

            if (bisICCard)//如果是IC卡,或是复合卡
            {
                if (CommonData.UserCardType == UserBankCardType.ICCard ||
                    CommonData.UserCardType == UserBankCardType.IcMagCard)
                {
                    emv.PayType = 0;
                }
                PostSync(EMVProcess);
                if (!bemvInit)
                {
                    ShowMessageAndGotoMain("交易失败!|IC卡初始化失败,请重试");
                    return;
                }
            }
            PayProcess();
        }
Beispiel #13
0
        protected override void OnEnter()
        {
            try
            {
                base.OnEnter();
                setComponnents("ComComponnents", true, false, false);

                GetElementById("Message1").InnerHtml = "正在查询,请稍后... ...";
                entity = (GetBusinessEntity() as DHRQPaymentEntity);
                if (QueryMsg() == 0)
                {
                    StartActivity("德化燃气明细信息显示");
                }
                else
                {
                    ShowMessageAndGotoMain("查询明细失败!|" + entity.returnCode + entity.returnMsg);
                }
            }
            catch (Exception ex)
            {
                Log.Error("[BeingQueryDetailMsgDeal][OnEnter] error" + ex);
            }
        }