Exemplo n.º 1
0
        protected override void OnEnter()
        {
            bool   succ         = false;
            string businessName = GetBusinessName();

            if (businessName == "PowerPay")
            {
                SyncTransaction(new CSignIn_PowerPay());
                succ = PowerPay.HasSignIn;
            }
            else if (businessName == "Car")
            {
                SyncTransaction(new CSignIn_CarPay());
                succ = CarPay.HasSignIn;
            }
            else
            {
                SyncTransaction(new CSignIn_YAPaymentPay());
                succ            = YAPaymentPay.HasSignIn;
                QMPay.HasSignIn = YAPaymentPay.HasSignIn;
            }

            if (!succ)
            {
                ShowMessageAndGotoMain("签到失败,该业务暂时不能使用");
            }
            else
            {
                switch (GetBusinessName())
                {
                case "CreditCard":
                    StartActivity(ReceiptPrinter.CheckedByManager() ? "信用卡还款温馨提示" : "信用卡打印机故障继续");
                    break;

                case "Mobile":
                    StartActivity(ReceiptPrinter.CheckedByManager() ? "手机充值主界面" : "手机充值打印机故障继续");
                    break;

                case "YAPublishPay":
                    StartActivity(ReceiptPrinter.CheckedByManager() ? "雅安支付输入用户号" : "雅安支付打印机故障继续");
                    break;

                case "PowerPay":
                    StartActivity(ReceiptPrinter.CheckedByManager() ? "电力支付菜单" : "电力支付打印机故障继续");
                    break;

                case "YATrafficPolice":
                    StartActivity(ReceiptPrinter.CheckedByManager() ? "雅安交警罚没菜单" : "雅安交警罚没打印机故障继续");
                    break;

                case "Car":
                    StartActivity(ReceiptPrinter.CheckedByManager() ? "车票预订主画面" : "雅安交警罚没打印机故障继续");
                    break;
                }
            }
        }
Exemplo n.º 2
0
        void Ok_Click(object sender, HtmlElementEventArgs e)
        {
            if (messageFlag && !ReceiptPrinter.CheckedByManager())
            {
                ShowMsg(true, "打印机故障,不能打印决定书编号,如继续,请牢记编号!");
                messageFlag = false;
                return;
            }
            messageFlag = true;
            ShowOrHideDetail(false);
            ShowProcess(true);

            TransResult             res    = TransResult.E_RECV_FAIL;
            CYATrafficPunishConfirm punish = new CYATrafficPunishConfirm(_index, _entity.LicenseNo);

            res = SyncTransaction(punish);
            if (res == TransResult.E_SUCC)
            {
                ShowProcess(false);

                PrintReceipt(GetReceipt(punish.Jdsbh));
                ShowMsg(true, "认罚成功,决定书编号:" + punish.Jdsbh);
            }
            else if (res == TransResult.E_HOST_FAIL)
            {
                ShowProcess(false);
                ShowErrMsg(true, punish.ReturnCode + "-" + punish.ReturnMessage);
            }
            else if (res == TransResult.E_RECV_FAIL)
            {
                ShowProcess(false);
                ShowErrMsg(true, "认罚超时,请重试");
            }
            else
            {
                ShowProcess(false);
                ShowErrMsg(true, "认罚失败,请重试");
            }
        }