コード例 #1
0
ファイル: __notify.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 处理航期订单信息
        /// </summary>
        /// <param name="orderId"></param>
        private void HandlerHangQiDingDan(string orderId)
        {
            if (string.IsNullOrEmpty(orderId))
            {
                return;
            }

            var info = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(orderId);

            if (info == null)
            {
                return;
            }

            var kuanInfo = new EyouSoft.Model.YlStructure.MHangQiDingDanKuanInfo();

            kuanInfo.BeiZhu     = string.Empty;
            kuanInfo.DingDanId  = info.DingDanId;
            kuanInfo.FangShi    = EyouSoft.Model.EnumType.YlStructure.ZaiXianZhiFuFangShi.Alipay;
            kuanInfo.FuKuanId   = string.Empty;
            kuanInfo.IssueTime  = DateTime.Now;
            kuanInfo.JinE       = info.JinE;
            kuanInfo.OperatorId = info.XiaDanRenId;
            kuanInfo.ShiJian    = DateTime.Now;
            kuanInfo.Status     = EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.已付款;

            new EyouSoft.BLL.YlStructure.BHangQiDingDan().SheZhiFuKuanStatus(info.DingDanId, info.XiaDanRenId, EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.已付款, DateTime.Now, kuanInfo);
        }
コード例 #2
0
ファイル: OrderPay.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// init hangqi dingdan
        /// </summary>
        void InitHangQiDingDan()
        {
            var info = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(DingDanId);

            if (info == null)
            {
                RCWE("异常请求");
            }
            if (info.DingDanStatus != EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.成交)
            {
                RCWE("你不能支付该订单");
            }
            if (info.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.已付款)
            {
                RCWE("该订单已支付");
            }

            EyouSoft.Model.SSOStructure.MYlHuiYuanInfo huiYuanInfo;
            bool isLogin = EyouSoft.Security.Membership.YlHuiYuanProvider.IsLogin(out huiYuanInfo);

            if (info.XiaDanRenId != Utils.GetQueryStringValue("token"))
            {
                RCWE("你不能支付该订单");
            }
            if (isLogin && info.XiaDanRenId != huiYuanInfo.HuiYuanId)
            {
                RCWE("你不能支付该订单");
            }

            ltrJiaoYiHao.Text = info.JiaoYiHao;
            ltrMingCheng.Text = info.MingCheng;
            ltrJinE.Text      = info.JinE.ToString("F2");
        }
コード例 #3
0
        void DianPing()
        {
            var yuMingInfo = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();

            EyouSoft.Model.YlStructure.MWzDianPingInfo info = null;

            string txtDianPingId = Utils.GetFormValue("txtDianPingId");

            if (!string.IsNullOrEmpty(txtDianPingId))
            {
                info = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDianPingInfo(txtDianPingId);
            }

            if (info == null)
            {
                info = new MWzDianPingInfo();

                info.ChuanZhiId       = string.Empty;
                info.CompanyId        = yuMingInfo.CompanyId;
                info.DianPingId       = string.Empty;
                info.DingDanId        = Utils.GetFormValue("txtDingDanId");
                info.DingDanLeiXing   = Utils.GetEnumValue <EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing>(Utils.GetFormValue("txtDingDanLeiXing"), DingDanLeiXing.航期订单);
                info.GongSiId         = string.Empty;
                info.GysId            = string.Empty;
                info.HangQiId         = string.Empty;
                info.IsNiMing         = false;
                info.IsShenHe         = false;
                info.IssueTime        = DateTime.Now;
                info.OperatorId       = HuiYuanInfo.HuiYuanId;
                info.RiQiId           = string.Empty;
                info.ShenHeOperatorId = string.Empty;
                info.ShenHeTime       = null;
                info.XiLieId          = string.Empty;
            }

            info.FenShu   = Utils.GetDecimal(Utils.GetFormValue("txtFenShu"));
            info.NeiRong  = Utils.GetFormValue("txtNeiRong");
            info.BiaoTi   = Utils.GetFormValue("txtBiaoTi");
            info.IsShenHe = false;

            if (info.DingDanLeiXing == DingDanLeiXing.航期订单)
            {
                var dingDanInfo = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(info.DingDanId);
                info.HangQiId = dingDanInfo.HangQiId;
            }

            if (string.IsNullOrEmpty(info.DianPingId))
            {
                new EyouSoft.BLL.YlStructure.BHuiYuan().InsertDianPing(info);
            }
            else
            {
                new EyouSoft.BLL.YlStructure.BHuiYuan().UpdateDianPing(info);
            }

            Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "点评成功"));
        }
コード例 #4
0
        /// <summary>
        /// 构造航期订单支付信息
        /// </summary>
        /// <param name="dingDanId"></param>
        /// <param name="subject"></param>
        /// <param name="body"></param>
        /// <param name="totalfee"></param>
        /// <returns></returns>
        private string GetHangQiDingDan(string dingDanId, ref string zhiFuBiaoTi, ref string zhiFuMiaoShu, ref decimal zhiFuJinE, ref string cpName, ref string dingDanHao)
        {
            string token = Utils.GetQueryStringValue("token");

            EyouSoft.Model.SSOStructure.MYlHuiYuanInfo huiYuanInfo;
            bool isLogin = EyouSoft.Security.Membership.YlHuiYuanProvider.IsLogin(out huiYuanInfo);

            var info = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(dingDanId);

            if (info == null)
            {
                Utils.RCWE("错误的请求");
            }

            if (info.XiaDanRenId != token)
            {
                Utils.RCWE("错误的请求");
            }

            if (isLogin)
            {
                if (info.XiaDanRenId != huiYuanInfo.HuiYuanId)
                {
                    Utils.RCWE("错误的请求");
                }
            }

            if (info.FuKuanStatus != EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款)
            {
                Utils.RCWE("错误的请求");
            }
            if (info.DingDanStatus != EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.成交)
            {
                Utils.RCWE("错误的请求");
            }

            if (string.IsNullOrEmpty(zhiFuBiaoTi))
            {
                zhiFuBiaoTi  = info.MingCheng + ",订单号:" + info.JiaoYiHao;
                zhiFuMiaoShu = "产品名称:" + info.MingCheng + ",订单号:" + info.JiaoYiHao + ",总金额:" + info.JinE.ToString("F2") + " 元";
            }

            zhiFuJinE += info.JinE;

            cpName     = info.MingCheng;
            dingDanHao = info.JiaoYiHao;

            return(string.Empty);
        }
コード例 #5
0
ファイル: QueRenDan.aspx.cs プロジェクト: windygu/XiaZhou
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Title = "确认单";
            var r = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(EyouSoft.Common.Utils.GetQueryStringValue("DingDanId"));

            if (r != null)
            {
                ltlMingCheng.Text      = r.MingCheng;
                ltlChanPinBianHao.Text = r.BianHao;
                ltlTian.Text           = r.TianShu1.ToString();
                ltlWan.Text            = r.TianShu2.ToString();
                if (r.JiaGes != null && r.JiaGes.Count > 0)
                {
                    rptFangXing.DataSource = r.JiaGes;
                    rptFangXing.DataBind();
                }
                var hangqi   = new EyouSoft.BLL.YlStructure.BHangQi().GetHangQiInfo(r.HangQiId);
                var riqi     = new EyouSoft.BLL.YlStructure.BHangQi().GetRiQiInfo(r.RiQiId);
                var chuanzhi = new EyouSoft.BLL.YlStructure.BJiChuXinXi().GetChuanZhiInfo(hangqi.ChuanZhiId);
                if (hangqi != null)
                {
                    ltlChuFaDate.Text = riqi != null?riqi.RiQi.ToShortDateString() : string.Empty;

                    ltlChuFaGang.Text  = hangqi.ChuFaGangKouMingCheng;
                    ltlDiDaGang.Text   = hangqi.DiDaGangKouMingCheng;
                    ltlZongTaiTel.Text = chuanzhi != null && r.FuKuanStatus == Model.EnumType.YlStructure.FuKuanStatus.已付款 ? chuanzhi.ChuanZaiDianHua : string.Empty;
                }
                if (r.YouKes != null && r.YouKes.Count > 0)
                {
                    rptYouKe.DataSource = r.YouKes;
                    rptYouKe.DataBind();
                }
                ltlYuDingRen.Text    = r.YuDingRenName;
                ltlYuDingMail.Text   = r.YuDingRenYouXiang;
                ltlYuDingMobile.Text = r.YuDingRenShouJi;
                if (r.FuJiaChanPins != null && r.FuJiaChanPins.Count > 0)
                {
                    rptFuJiaChanPin.DataSource = r.FuJiaChanPins;
                    rptFuJiaChanPin.DataBind();
                }
            }
        }
コード例 #6
0
ファイル: DingDanChaKan.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 设置状态
        /// </summary>
        void BaoCun()
        {
            string id = Utils.GetQueryStringValue("id");

            EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus state = (EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus)Utils.GetInt(Utils.GetFormValue("dingdanState"));

            MHangQiDingDanInfo model = new MHangQiDingDanInfo()
            {
                DingDanId = id, JinE = Utils.GetDecimal(Utils.GetFormValue(this.litZongJinE.UniqueID)), DingDanStatus = state, XiaDanRenId = SiteUserInfo.UserId, DingDanJiFen = Utils.GetDecimal(Utils.GetFormValue(txtDingDanJiFen.UniqueID))
            };
            var b      = new EyouSoft.BLL.YlStructure.BHangQiDingDan();
            var result = b.UpdateDingDan(model);

            if (result == 1)
            {
                result = b.SheZhiDingDanStatus(id, SiteUserInfo.UserId, state, null);
            }
            if (result == 1)
            {
                SavaCaoZuoBeiZhu(); RCWE(UtilsCommons.AjaxReturnJson("1", "保存成功"));
            }
            RCWE(UtilsCommons.AjaxReturnJson("0", "保存失败"));
        }
コード例 #7
0
        /// <summary>
        /// init rpt
        /// </summary>
        void InitRpt()
        {
            var chaXun      = GetChaXunInfo();
            int recordCount = 0;

            pageIndex = UtilsCommons.GetPadingIndex();
            var items = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDans(CurrentUserCompanyID, pageSize, pageIndex, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                rpt.DataSource = items;
                rpt.DataBind();

                paging.UrlParams      = Request.QueryString;
                paging.intPageSize    = pageSize;
                paging.CurrencyPage   = pageIndex;
                paging.intRecordCount = recordCount;
            }
            else
            {
                phEmpty.Visible = true;
                phHeJi.Visible  = false;
            }
        }
コード例 #8
0
ファイル: DingDanXX.aspx.cs プロジェクト: windygu/XiaZhou
        void initPage()
        {
            string dingDanId      = Utils.GetQueryStringValue("dingdanid");
            var    DingDanLeiXing = (EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing?)Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing), Utils.GetQueryStringValue("dingdanleixing"));

            if (!DingDanLeiXing.HasValue ||
                DingDanLeiXing.Value != EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.航期订单)
            {
                Utils.RCWE("请求异常!");
            }

            MHangQiDingDanInfo model = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(dingDanId);

            if (model == null)
            {
                Utils.RCWE("请求异常!");
            }

            string token = Utils.GetQueryStringValue("token");

            if (string.IsNullOrEmpty(token))
            {
                Utils.RCWE("请求异常!");
            }

            EyouSoft.Model.SSOStructure.MYlHuiYuanInfo huiYuanInfo;
            bool isLogin = EyouSoft.Security.Membership.YlHuiYuanProvider.IsLogin(out huiYuanInfo);

            if (model.XiaDanRenId != token)
            {
                RCWE("请求异常");
            }
            if (isLogin && model.XiaDanRenId != huiYuanInfo.HuiYuanId)
            {
                RCWE("请求异常");
            }

            dingdanhao.Text = model.JiaoYiHao;

            dingdanzhuangtai.Text = model.FuKuanStatus.ToString();
            if (model.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款)
            {
                dingdanzhuangtai.Text = "<span style='color:#ff0000'>未付款</span>";

                if (model.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.成交)
                {
                    ltr01.Text = "<a href=\"orderpay.aspx?dingdanleixing=" + (int)DingDanLeiXing.Value + "&dingdanid=" + dingDanId + "&token=" + token + "\" class=\"fukuan\">付款</a>";
                }
                else if (model.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.审核中 || model.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.未处理)
                {
                    ltr01.Text = "审核中";
                }
                else if (model.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.取消)
                {
                    ltr01.Text = "已取消";
                }
                else
                {
                    ltr01.Text = string.Empty;
                }
            }
            else
            {
                ltr01.Text = string.Format("<a href=\"/Print/QueRenDan.aspx?DingDanId={0}\" target=\"_blank\" class=\"print-btn\">打印订单</a> <a href=\"/Print/XingChengDan.aspx?HangQiId={1}\" target=\"_blank\" class=\"print-btn\">打印行程单</a>", dingDanId, model.HangQiId);
            }

            chanpinjine.Text = "";
            decimal jinE = 0;

            #region  产品金额


            if (model.IsTuanGou)
            {
                if (model.TGJiaGes != null && model.TGJiaGes.Count > 0)
                {
                    foreach (var item in model.TGJiaGes)
                    {
                        jinE += item.RenShu * item.JiaGe;
                    }
                }
            }
            else
            {
                if (model.YouLunLeiXing == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.长江游轮)
                {
                    if (model.JiaGes != null && model.JiaGes.Count > 0)
                    {
                        foreach (var item in model.JiaGes)
                        {
                            jinE += item.RenShu1 * item.JiaGe1 + item.RenShu2 * item.JiaGe2 + item.RenShu3 * item.JiaGe3 + item.RenShu4 * item.JiaGe4;
                        }
                    }
                }
                else if (model.YouLunLeiXing == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮)
                {
                    if (model.HYJiaGes != null && model.HYJiaGes.Count > 0)
                    {
                        foreach (var item in model.HYJiaGes)
                        {
                            jinE += item.JinE;
                        }
                    }
                }
            }
            #endregion
            chanpinjine.Text = jinE.ToString("C2");


            if (model.DiKouInfo != null)
            {
                shiyongjifen.Text = string.Format("-{0}", model.DiKouInfo.JinFenJinE.ToString("C2"));
            }
            else
            {
                JiFenTr.Visible = false;
            }
            shifujine.Text = model.JinE.ToString("C2");

            #region 附加产品
            decimal sumFJ = 0M;
            if (model.FuJiaChanPins != null && model.FuJiaChanPins.Count > 0)
            {
                for (int i = 0; i < model.FuJiaChanPins.Count; i++)
                {
                    sumFJ += model.FuJiaChanPins[i].JinE;
                }
            }
            fujiachanpinjie.Text = string.Format("{0}", sumFJ.ToString("C2"));
            #endregion

            kuaidifei.Text = model.FaPiaoKuaiDiJinE.ToString("C2");



            var hangqi   = new EyouSoft.BLL.YlStructure.BHangQi().GetHangQiInfo(model.HangQiId);
            var riqi     = new EyouSoft.BLL.YlStructure.BHangQi().GetRiQiInfo(model.RiQiId);
            var chuanzhi = new EyouSoft.BLL.YlStructure.BJiChuXinXi().GetChuanZhiInfo(hangqi.ChuanZhiId);

            if (hangqi != null)
            {
                dengchuanxinxi.Text = string.Format("<tr><td align=\"center\" valign=\"middle\">{0}</td><td align=\"center\">{1}</td><td align=\"center\" valign=\"middle\" class=\"font12\">{2}</td><td align=\"center\" valign=\"middle\">{3}</td></tr>", riqi != null ? riqi.RiQi.ToString() : "", hangqi.ChuFaGangKouMingCheng, hangqi.DiDaGangKouMingCheng, chuanzhi != null && model.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.已付款 ? chuanzhi.ChuanZaiDianHua : "");
            }

            dingdanxinxi.Text += string.Format(" <tr>");
            dingdanxinxi.Text += string.Format(" <td align=\"middle\" class=\"padd20\">{0}</td>", model.MingCheng);
            dingdanxinxi.Text += string.Format(" <td align=\"center\">{0}</td>", riqi != null ? riqi.RiQi.ToString("yyyy-MM-dd") : "");
            dingdanxinxi.Text += string.Format(" <td align=\"center\" valign=\"top\" class=\"font12\">");


            #region 价格信息
            if (model.JiaGes != null && model.JiaGes.Count > 0)
            {
                for (int i = 0; i < model.JiaGes.Count; i++)
                {
                    dingdanxinxi.Text += string.Format(" <dl> <dt>【{0}】</dt><dd> {2} {1}人</dd></dl>", getGYSName(model.JiaGes[i].FangXingId.ToString()), (model.JiaGes[i].RenShu1 + model.JiaGes[i].RenShu2 + model.JiaGes[i].RenShu3 + model.JiaGes[i].RenShu4), getGYSName(model.JiaGes[i].BinKeLeiXingId.ToString()));
                }
            }

            #endregion



            dingdanxinxi.Text += string.Format("</dl></td>");
            dingdanxinxi.Text += string.Format("<td align=\"center\" valign=\"middle\">");

            if (model.FuJiaChanPins != null && model.FuJiaChanPins.Count > 0)
            {
                for (int i = 0; i < model.FuJiaChanPins.Count; i++)
                {
                    dingdanxinxi.Text += string.Format("{0}</br>", getGYSName(model.FuJiaChanPins[i].LeiXingId.ToString()));
                }
            }

            dingdanxinxi.Text += string.Format("</td></tr>");



            #region  游轮信息



            if (hangqi != null)
            {
            }
            #endregion

            #region 优惠信息
            decimal sumYH = 0M;
            if (model.YouHuis != null && model.YouHuis.Count > 0)
            {
                for (int i = 0; i < model.YouHuis.Count; i++)
                {
                    sumYH += model.YouHuis[i].JinE;
                }
            }
            youhuijine.Text = string.Format("-{0}", sumYH.ToString("C2"));
            #endregion

            #region 游客信息
            if (model.YouKes != null && model.YouKes.Count > 0)
            {
                rptyoukes.DataSource = model.YouKes;
                rptyoukes.DataBind();
            }
            #endregion

            #region 预订信息
            yudingren.Text     = model.YuDingRenName;
            yudingyoujian.Text = model.YuDingRenYouXiang;
            yudingshouji.Text  = model.YuDingRenShouJi;
            xiadanbeizhu.Text  = model.XiaDanBeiZhu;
            #endregion

            if (model.IsXuYaoFaPiao)
            {
                #region 发票信息
                fapiaotaitou.Text = model.FaPiaoTaiTou;
                fapiaomingxi.Text = model.FaPiaoMingXi;
                #endregion

                #region 配送方式
                var dizhi = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDiZhiInfo(model.FaPiaoDiZhiId);
                if (dizhi != null)
                {
                    var dizhixiangqing = new EyouSoft.BLL.ComStructure.BComCity().GetCPCD(YuMingInfo.CompanyId, dizhi.GuoJiaId, dizhi.ShengFenId, dizhi.ChengShiId, dizhi.XianQuId);
                    peisongfangshi.Text = string.Format("{0}({1})", dizhixiangqing != null ? dizhixiangqing.CountryName + dizhixiangqing.ProvinceName + dizhixiangqing.CityName + dizhixiangqing.CountyName + dizhi.DiZhi : "", model.FaPiaoPeiSongFangShi);
                }
                #endregion
            }
            else
            {
                phFaPiao.Visible = false;
                phFaPiaoPeiSongFangShi.Visible = false;
            }

            #region 旅客须知
            EyouSoft.Model.YlStructure.MWzKvInfo lkxz = null;

            if (hangqi.LeiXing == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.长江游轮)
            {
                lkxz = new EyouSoft.BLL.YlStructure.BWz().GetKvInfo(YuMingInfo.CompanyId, EyouSoft.Model.EnumType.YlStructure.WzKvKey.长江游轮旅客须知);
            }
            if (hangqi.LeiXing == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮)
            {
                lkxz = new EyouSoft.BLL.YlStructure.BWz().GetKvInfo(YuMingInfo.CompanyId, EyouSoft.Model.EnumType.YlStructure.WzKvKey.海洋邮轮旅客须知);
            }
            if (lkxz != null && !string.IsNullOrEmpty(lkxz.V))
            {
                ltrLvKeXuZhi.Text = lkxz.V;
            }
            #endregion
        }
コード例 #9
0
ファイル: DingDanChaKan.aspx.cs プロジェクト: windygu/XiaZhou
        /// <summary>
        /// 初始化页面
        /// </summary>
        void initPage()
        {
            string             id    = Utils.GetQueryStringValue("id");
            MHangQiDingDanInfo model = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(id);

            if (model == null)
            {
                return;
            }

            fukuanzhuangtai.Text = model.FuKuanStatus.ToString();
            if (model.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.已付款)
            {
                var zxzfinfo = new EyouSoft.BLL.YlStructure.BZaiXianZhiFu().GetInfo(model.DingDanId);
                if (zxzfinfo != null)
                {
                    switch (zxzfinfo.ZhiFuFangShi)
                    {
                    case   EyouSoft.Model.EnumType.YlStructure.ZaiXianZhiFuFangShi.Alipay:
                        fukuanzhuangtai.Text += "【支付宝】";
                        break;

                    case EyouSoft.Model.EnumType.YlStructure.ZaiXianZhiFuFangShi.Bill99:
                        fukuanzhuangtai.Text += "【快钱】";
                        break;

                    default: break;
                    }
                }
            }

            litZongJinE.Text     = model.JinE.ToString("F2");
            txtDingDanJiFen.Text = model.DingDanJiFen.ToString("F2");
            if (model.DiKouInfo != null)
            {
                litDiKouJinE.Text = model.DiKouInfo.JinFenJinE.ToString("F2");
            }
            else
            {
                litDiKouJinE.Text = "0.00";
            }
            dingdanzhuangtai   = ((int)(model.DingDanStatus)).ToString();
            litKuaiDiJinE.Text = model.FaPiaoKuaiDiJinE.ToString("F2");

            selectDDL.Text        = getSelectState(((int)model.DingDanStatus).ToString());
            txtCaoZuoBeiZhu.Value = model.CaoZuoBeiZhu;

            #region  游轮信息

            gongyingshang.Text  = model.GysName;
            youlungongsi.Text   = model.GongSiName;
            youlunxilie.Text    = model.XiLieName;
            youlunchuanzhi.Text = model.ChuanZhiName;

            var hangqi = new EyouSoft.BLL.YlStructure.BHangQi().GetHangQiInfo(model.HangQiId);//获取航期

            if (hangqi != null)
            {
                chufagangkou.Text     = hangqi.ChuFaGangKouMingCheng;
                didagangkou.Text      = hangqi.DiDaGangKouMingCheng;
                xingchengtianshu.Text = string.Format("{0}天{1}晚", hangqi.TianShu1, hangqi.TianShu2);
                chanpinmingcheng.Text = hangqi.MingCheng;
                chanpinbianhao.Text   = hangqi.BianHao;
            }
            #endregion

            #region 价格信息
            jiagexingxi.Text = GetFangXingString(model);
            #endregion

            #region 附加产品
            if (model.FuJiaChanPins != null && model.FuJiaChanPins.Count > 0)
            {
                rptfujia.DataSource = model.FuJiaChanPins;
                rptfujia.DataBind();
                PlaceHolder2.Visible = false;
            }
            #endregion

            #region 优惠信息
            if (model.YouHuis != null && model.YouHuis.Count > 0)
            {
                rptyouhuis.DataSource = model.YouHuis;
                rptyouhuis.DataBind();
            }

            #endregion

            #region 游客信息
            if (model.YouKes != null && model.YouKes.Count > 0)
            {
                rptyouke.DataSource = model.YouKes;
                rptyouke.DataBind();
                PlaceHolder3.Visible = false;
            }
            #endregion

            #region 预订信息
            yudingxingming.Text = model.YuDingRenName;
            //yudingzhanghao.Text=model.yudingz
            yudingshijian.Text        = model.IssueTime.ToString();
            yudinglianxidianhua.Text  = model.YuDingRenDianHua;
            yudinglianxishouji.Text   = model.YuDingRenShouJi;
            yudinglianxiyouxiang.Text = model.YuDingRenYouXiang;
            xiadanbeizhu.Text         = model.XiaDanBeiZhu;
            #endregion

            #region 发票信息
            if (model.IsXuYaoFaPiao)
            {
                var dizhi = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDiZhiInfo(model.FaPiaoDiZhiId);
                if (dizhi != null)
                {
                    var dizhixiangqing = new EyouSoft.BLL.ComStructure.BComCity().GetCPCD(SiteUserInfo.CompanyId, dizhi.GuoJiaId, dizhi.ShengFenId, dizhi.ChengShiId, dizhi.XianQuId);
                    //youjidizhi.Text = string.Format("{0}({1})", dizhixiangqing != null ? dizhixiangqing.CountryName + dizhixiangqing.ProvinceName + dizhixiangqing.CityName + dizhixiangqing.CountyName + dizhi.DiZhi : "", model.FaPiaoPeiSongFangShi);
                    if (dizhixiangqing != null)
                    {
                        youjidizhi.Text          = dizhixiangqing.ProvinceName + "&nbsp;" + dizhixiangqing.CityName + "&nbsp;" + dizhixiangqing.CountyName + "&nbsp;" + dizhi.DiZhi;
                        shoujianrenxingming.Text = dizhi.XingMing;
                        shoujianrendianhua.Text  = dizhi.DianHua;
                    }
                }

                ltrFaPiaoTaiTou.Text = model.FaPiaoTaiTou;
                ltrFaPiaoMingXi.Text = model.FaPiaoMingXi;

                phFaPiao1.Visible         = true;
                ltrShiFouXuYaoFaPiao.Text = "需要发票";
            }
            else
            {
                ltrShiFouXuYaoFaPiao.Text = "不需要发票";
            }
            #endregion

            chufariqi.Text = model.RiQi.ToString("yyyy-MM-dd");

            if (model.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.取消)
            {
                ltrCaoZuo.Text = "订单已取消";
            }
            else
            {
                if (model.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.已付款)
                {
                    ltrCaoZuo.Text = "订单已付款";
                }
                else
                {
                    ltrCaoZuo.Text = "<a id=\"btnSave\" href=\"javascript:;\"><s class=\"baochun\"></s>保 存</a> ";
                }
            }
        }
コード例 #10
0
ファイル: DingDanChaKan.aspx.cs プロジェクト: windygu/XiaZhou
        void BaoCunYK()
        {
            string dingdanid = Utils.GetQueryStringValue("id");

            string[] yk_youkeid            = Utils.GetFormValues("yk_youkeid");
            string[] yk_xingming           = Utils.GetFormValues("yk_xingming");
            string[] yk_xingbie            = Utils.GetFormValues("yk_xingbie");
            string[] yk_zhengjianleixing   = Utils.GetFormValues("yk_zhengjianleixing");
            string[] yk_zhengjianhaoma     = Utils.GetFormValues("yk_zhengjianhaoma");
            string[] yk_zhengjianyouxiaoqi = Utils.GetFormValues("yk_zhengjianyouxiaoqi");
            string[] yk_chushengriqi       = Utils.GetFormValues("yk_chushengriqi");
            string[] yk_shouji             = Utils.GetFormValues("yk_shouji");

            IList <MHangQiDingDanYouKeInfo> items = new List <MHangQiDingDanYouKeInfo>();

            for (int i = 0; i < yk_youkeid.Length; i++)
            {
                var item = new MHangQiDingDanYouKeInfo();

                item.YouKeId            = yk_youkeid[i];
                item.XingMing           = yk_xingming[i];
                item.XingBie            = Utils.GetEnumValue(yk_xingbie[i], EyouSoft.Model.EnumType.GovStructure.Gender.男);
                item.ZhengJianLeiXing   = Utils.GetEnumValue(yk_zhengjianleixing[i], EyouSoft.Model.EnumType.YlStructure.YKZJLeiXing.请选择);
                item.ZhengJianHaoMa     = yk_zhengjianhaoma[i];
                item.ZhengJianYouXiaoQi = Utils.GetDateTimeNullable(yk_zhengjianyouxiaoqi[i]);
                item.ChuShengRiQi       = Utils.GetDateTimeNullable(yk_chushengriqi[i]);
                item.ShouJi             = yk_shouji[i];

                if (item.ZhengJianYouXiaoQi.HasValue)
                {
                    item.YXQ1 = item.ZhengJianYouXiaoQi.Value.Year.ToString();
                    item.YXQ2 = item.ZhengJianYouXiaoQi.Value.Month.ToString();
                    item.YXQ3 = item.ZhengJianYouXiaoQi.Value.Day.ToString();
                }

                if (item.ChuShengRiQi.HasValue)
                {
                    item.SR1 = item.ChuShengRiQi.Value.Year.ToString();
                    item.SR2 = item.ChuShengRiQi.Value.Month.ToString();
                    item.SR3 = item.ChuShengRiQi.Value.Day.ToString();
                }

                if (item.ZhengJianLeiXing == EyouSoft.Model.EnumType.YlStructure.YKZJLeiXing.身份证)
                {
                    item.ChuShengRiQi = Utils.GetDateTimeNullable(getSR(item.ZhengJianHaoMa));
                    item.XingBie      = (EyouSoft.Model.EnumType.GovStructure.Gender)Utils.GetInt(getXB(item.ZhengJianHaoMa));
                }

                items.Add(item);
            }

            int bllRetCode = new EyouSoft.BLL.YlStructure.BHangQiDingDan().UpdateDingDanYouKes(dingdanid, items);

            if (bllRetCode == 1)
            {
                SavaCaoZuoBeiZhu(); RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
        }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            System.IO.StreamWriter sw = new System.IO.StreamWriter(Server.MapPath("/unionpay/notify_data.txt"));
            sw.WriteLine(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"));
            sw.Close();

            // 要使用各种Srv必须先使用LoadConf载入配置
            string strConfigPath = EyouSoft.Toolkit.ConfigHelper.ConfigClass.GetConfigString("UnionpayConfigFilepath");

            UPOPSrv.LoadConf(Server.MapPath(strConfigPath));
            // 使用Post过来的内容构造SrvResponse
            SrvResponse resp = new SrvResponse(Util.NameValueCollection2StrDict(Request.Form));

            #region 取得返回参数
            string respCode     = resp.Fields["respCode"];
            string merId        = resp.Fields["merId"];
            string orderAmount  = resp.Fields["orderAmount"];
            string orderNumber  = resp.Fields["orderNumber"];
            string qid          = resp.Fields["qid"];
            string respTime     = resp.Fields["respTime"];
            string version      = resp.Fields["version"];
            string strOrderID   = orderNumber.Substring(15, orderNumber.Length - 15);
            string strOrderTpye = orderNumber.Substring(14, 1);

            var dingDanLeiXing = (EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing)Convert.ToInt32(strOrderTpye);

            string dingDanId = string.Empty;

            if (dingDanLeiXing == EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.兑换订单)
            {
                dingDanId = new EyouSoft.BLL.YlStructure.BDuiHuan().GetDingDanId(Utils.GetInt(strOrderID));
            }
            else if (dingDanLeiXing == EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.航期订单)
            {
                dingDanId = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanId(Utils.GetInt(strOrderID));
            }

            #endregion
            // 收到回应后做后续处理
            string strMsg = "支付失败!";
            if (resp.ResponseCode == SrvResponse.RESP_SUCCESS)
            {
                var info      = new EyouSoft.Model.YlStructure.MZaiXianZhiFuInfo();  //在线支付实体
                var onlinepay = new EyouSoft.BLL.YlStructure.BZaiXianZhiFu();        //在线支付BLL
                info.DingDanId      = dingDanId;                                     //订单ID
                info.DingDanLeiXing = dingDanLeiXing;                                //订单类型
                bool ispay = onlinepay.IsZhiFu(info.DingDanId, info.DingDanLeiXing); //获取订单支付状态(成功/失败)

                if (!ispay)
                {
                    info.JiaoYiHao    = orderNumber;                                                      //流水号
                    info.ApiJiaoYiHao = qid;                                                              //支付流水号
                    info.JinE         = Utils.GetDecimal(orderAmount);                                    //支付金额
                    info.ZhiFuFangShi = EyouSoft.Model.EnumType.YlStructure.ZaiXianZhiFuFangShi.Unionpay; //支付方式
                    info.IsZhiFu      = true;                                                             //是否已支付
                    info.ZhiFuTime    = DateTime.Now;                                                     //支付时间
                    int bllRetCode = onlinepay.Insert(info);                                              //添加支付记录
                    if (bllRetCode == 1)
                    {
                        //实现其它操作处理
                        switch (info.DingDanLeiXing)
                        {
                        case EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.兑换订单:
                            HandlerJiFenDingDan(info.DingDanId);
                            break;

                        case EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.航期订单:
                            HandlerHangQiDingDan(info.DingDanId);
                            break;
                        }
                    }
                }

                strMsg = "支付成功";
            }
            //支付接口回调通知
            Response.Write(strMsg);
            Response.End();
        }
コード例 #12
0
        /// <summary>
        /// 构造航期订单支付信息
        /// </summary>
        /// <param name="arrstrOrderId"></param>
        /// <param name="subject"></param>
        /// <param name="body"></param>
        /// <param name="totalfee"></param>
        /// <param name="orderList"></param>
        /// <returns></returns>
        private string GetHangQiDingDan(string[] arrstrOrderId, ref string subject, ref string body, ref decimal totalfee
                                        , List <string> orderList)
        {
            if (arrstrOrderId == null || arrstrOrderId.Length <= 0 || arrstrOrderId.Length > 1)
            {
                return("要支付的订单不存在!");
            }

            if (orderList == null)
            {
                orderList = new List <string>();
            }

            string token = Utils.GetQueryStringValue("token");

            EyouSoft.Model.SSOStructure.MYlHuiYuanInfo huiYuanInfo;
            bool isLogin = EyouSoft.Security.Membership.YlHuiYuanProvider.IsLogin(out huiYuanInfo);

            foreach (string strId in arrstrOrderId)
            {
                if (string.IsNullOrEmpty(strId))
                {
                    continue;
                }

                var info = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(strId);

                if (info == null)
                {
                    continue;
                }

                if (info.XiaDanRenId != token)
                {
                    Utils.RCWE("错误的请求");
                }

                if (isLogin)
                {
                    if (info.XiaDanRenId != huiYuanInfo.HuiYuanId)
                    {
                        Utils.RCWE("错误的请求");
                    }
                }

                if (info.FuKuanStatus != EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款)
                {
                    Utils.RCWE("错误的请求");
                }
                if (info.DingDanStatus != EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.成交)
                {
                    Utils.RCWE("错误的请求");
                }

                if (string.IsNullOrEmpty(subject))
                {
                    subject = "产品名称:" + info.MingCheng + ",订单号:" + info.JiaoYiHao;
                    body    = "产品名称:" + info.MingCheng + ",订单号:" + info.JiaoYiHao + ",总金额:" + info.JinE.ToString("F2") + " 元";
                }

                totalfee += info.JinE;

                orderList.Add(strId);  //订单ID
            }

            return(string.Empty);
        }
コード例 #13
0
ファイル: Alipay_Return.aspx.cs プロジェクト: windygu/XiaZhou
        protected void Page_Load(object sender, EventArgs e)
        {
            PayAPI.Model.Ali.AliPayTradeNotify notify = PayAPI.Ali.Alipay.Create.GetReturn();//支付宝的返回通知实体

            string rurl       = string.Empty;
            var    YuMingInfo = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();

            rurl = "http://" + YuMingInfo.YuMing;

            if (notify.IsTradeSuccess)
            {
                var info      = new EyouSoft.Model.YlStructure.MZaiXianZhiFuInfo(); //在线支付实体
                var onlinepay = new EyouSoft.BLL.YlStructure.BZaiXianZhiFu();       //在线支付BLL
                foreach (var item in notify.OrderInfo.OrderID)
                {
                    info.DingDanId      = item;                                                                                                      //订单ID
                    info.DingDanLeiXing = (EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing)Convert.ToInt32(notify.AttachList["OrderType"].Value); //订单类型
                    bool ispay = onlinepay.IsZhiFu(info.DingDanId, info.DingDanLeiXing);                                                             //获取订单支付状态(成功/失败)

                    if (info.DingDanLeiXing == EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.航期订单)
                    {
                        var dingdaninfo = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(info.DingDanId);
                        if (dingdaninfo != null)
                        {
                            rurl += "/hangqi/dingdanxx.aspx?dingdanid=" + info.DingDanId + "&dingdanleixing=" + (int)info.DingDanLeiXing + "&token=" + dingdaninfo.XiaDanRenId;
                        }
                    }
                    else if (info.DingDanLeiXing == EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.兑换订单)
                    {
                        var dingdaninfo = new EyouSoft.BLL.YlStructure.BDuiHuan().GetJiFenDingDanInfo(info.DingDanId);
                        rurl += "/hangqi/JiFenDingDanXX.aspx?dingdanid=" + info.DingDanId + "&dingdanleixing=" + (int)info.DingDanLeiXing + "&token=" + dingdaninfo.XiaDanRenId;
                    }

                    if (!ispay)
                    {
                        info.JiaoYiHao    = notify.OutTradeNo;                                              //流水号
                        info.ApiJiaoYiHao = notify.TradeNo;                                                 //支付流水号
                        info.JinE         = notify.Totalfee;                                                //支付金额
                        info.ZhiFuFangShi = EyouSoft.Model.EnumType.YlStructure.ZaiXianZhiFuFangShi.Alipay; //支付方式
                        info.IsZhiFu      = true;                                                           //是否已支付
                        info.ZhiFuTime    = DateTime.Now;                                                   //支付时间
                        int bllRetCode = onlinepay.Insert(info);                                            //添加支付记录
                        if (bllRetCode == 1)
                        {
                            //实现其它操作处理
                            switch (info.DingDanLeiXing)
                            {
                            case EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.兑换订单:
                                HandlerJiFenDingDan(info.DingDanId);
                                break;

                            case EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.航期订单:
                                HandlerHangQiDingDan(info.DingDanId);
                                break;
                            }
                        }
                    }
                }
            }
            //支付接口回调通知
            Response.Write(notify.PayAPICallBackMsg);
            Response.Redirect(rurl);
            Response.End();
        }
コード例 #14
0
        /// <summary>
        /// 构造航期订单支付信息
        /// </summary>
        /// <param name="dingDanId"></param>
        /// <param name="subject"></param>
        /// <param name="body"></param>
        /// <param name="totalfee"></param>
        /// <returns></returns>
        private string GetHangQiDingDan(string dingDanId, ref string zhiFuBiaoTi, ref string zhiFuMiaoShu, ref decimal zhiFuJinE, ref string cpName, ref string cpUrl, ref int dingDanIdentityId)
        {
            string token = Utils.GetQueryStringValue("token");

            EyouSoft.Model.SSOStructure.MYlHuiYuanInfo huiYuanInfo;
            bool isLogin = EyouSoft.Security.Membership.YlHuiYuanProvider.IsLogin(out huiYuanInfo);

            var info = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(dingDanId);

            if (info == null)
            {
                Utils.RCWE("错误的请求");
            }

            if (info.XiaDanRenId != token)
            {
                Utils.RCWE("错误的请求");
            }

            if (isLogin)
            {
                if (info.XiaDanRenId != huiYuanInfo.HuiYuanId)
                {
                    Utils.RCWE("错误的请求");
                }
            }

            if (info.FuKuanStatus != EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款)
            {
                Utils.RCWE("错误的请求");
            }
            if (info.DingDanStatus != EyouSoft.Model.EnumType.YlStructure.HangQiDingDanStatus.成交)
            {
                Utils.RCWE("错误的请求");
            }

            if (string.IsNullOrEmpty(zhiFuBiaoTi))
            {
                zhiFuBiaoTi  = "产品名称:" + info.MingCheng + ",订单号:" + info.JiaoYiHao;
                zhiFuMiaoShu = "产品名称:" + info.MingCheng + ",订单号:" + info.JiaoYiHao + ",总金额:" + info.JinE.ToString("F2") + " 元";
            }

            if (info.IsTuanGou)
            {
                cpUrl += "/tuangou/tuangouxiangqing.aspx?tuangouid=" + info.TuanGouId;
            }
            else
            {
                if (info.YouLunLeiXing == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮)
                {
                    cpUrl += "/hangqi/haiyanginfo.aspx?id=" + info.HangQiId;
                }
                else if (info.YouLunLeiXing == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.长江游轮)
                {
                    cpUrl += "/hangqi/hangqiinfo.aspx?id=" + info.HangQiId;
                }
            }

            zhiFuJinE += info.JinE;

            cpName            = info.MingCheng;
            cpUrl             = "http://" + YuMingInfo.YuMing;
            dingDanIdentityId = info.IdentityId;


            return(string.Empty);
        }
コード例 #15
0
ファイル: receive.aspx.cs プロジェクト: windygu/XiaZhou
        protected void Page_Load(object sender, EventArgs e)
        {
            //人民币网关账号,该账号为11位人民币网关商户编号+01,该值与提交时相同。
            string merchantAcctId = Request.QueryString["merchantAcctId"].ToString();
            //网关版本,固定值:v2.0,该值与提交时相同。
            string version = Request.QueryString["version"].ToString();
            //语言种类,1代表中文显示,2代表英文显示。默认为1,该值与提交时相同。
            string language = Request.QueryString["language"].ToString();
            //签名类型,该值为4,代表PKI加密方式,该值与提交时相同。
            string signType = Request.QueryString["signType"].ToString();
            //支付方式,一般为00,代表所有的支付方式。如果是银行直连商户,该值为10,该值与提交时相同。
            string payType = Request.QueryString["payType"].ToString();
            //银行代码,如果payType为00,该值为空;如果payType为10,该值与提交时相同。
            string bankId = Request.QueryString["bankId"].ToString();
            //商户订单号,,该值与提交时相同。
            string orderId = Request.QueryString["orderId"].ToString();
            //订单提交时间,格式:yyyyMMddHHmmss,如:20071117020101,该值与提交时相同。
            string orderTime = Request.QueryString["orderTime"].ToString();
            //订单金额,金额以“分”为单位,商户测试以1分测试即可,切勿以大金额测试,该值与支付时相同。
            string orderAmount = Request.QueryString["orderAmount"].ToString();
            // 快钱交易号,商户每一笔交易都会在快钱生成一个交易号。
            string dealId = Request.QueryString["dealId"].ToString();
            //银行交易号 ,快钱交易在银行支付时对应的交易号,如果不是通过银行卡支付,则为空
            string bankDealId = Request.QueryString["bankDealId"].ToString();
            //快钱交易时间,快钱对交易进行处理的时间,格式:yyyyMMddHHmmss,如:20071117020101
            string dealTime = Request.QueryString["dealTime"].ToString();
            //商户实际支付金额 以分为单位。比方10元,提交时金额应为1000。该金额代表商户快钱账户最终收到的金额。
            string payAmount = Request.QueryString["payAmount"].ToString();
            //费用,快钱收取商户的手续费,单位为分。
            string fee = Request.QueryString["fee"].ToString();
            //扩展字段1,该值与提交时相同。
            string ext1 = Request.QueryString["ext1"].ToString();
            //扩展字段2,该值与提交时相同。
            string ext2 = Request.QueryString["ext2"].ToString();
            //处理结果, 10支付成功,11 支付失败,00订单申请成功,01 订单申请失败
            string payResult = Request.QueryString["payResult"].ToString();
            //错误代码 ,请参照《人民币网关接口文档》最后部分的详细解释。
            string errCode = Request.QueryString["errCode"].ToString();
            //签名字符串
            string signMsg    = Request.QueryString["signMsg"].ToString();
            string signMsgVal = "";

            signMsgVal = appendParam(signMsgVal, "merchantAcctId", merchantAcctId);
            signMsgVal = appendParam(signMsgVal, "version", version);
            signMsgVal = appendParam(signMsgVal, "language", language);
            signMsgVal = appendParam(signMsgVal, "signType", signType);
            signMsgVal = appendParam(signMsgVal, "payType", payType);
            signMsgVal = appendParam(signMsgVal, "bankId", bankId);
            signMsgVal = appendParam(signMsgVal, "orderId", orderId);
            signMsgVal = appendParam(signMsgVal, "orderTime", orderTime);
            signMsgVal = appendParam(signMsgVal, "orderAmount", orderAmount);
            signMsgVal = appendParam(signMsgVal, "dealId", dealId);
            signMsgVal = appendParam(signMsgVal, "bankDealId", bankDealId);
            signMsgVal = appendParam(signMsgVal, "dealTime", dealTime);
            signMsgVal = appendParam(signMsgVal, "payAmount", payAmount);
            signMsgVal = appendParam(signMsgVal, "fee", fee);
            signMsgVal = appendParam(signMsgVal, "ext1", ext1);
            signMsgVal = appendParam(signMsgVal, "ext2", ext2);
            signMsgVal = appendParam(signMsgVal, "payResult", payResult);
            signMsgVal = appendParam(signMsgVal, "errCode", errCode);

            ///UTF-8编码  GB2312编码  用户可以根据自己网站的编码格式来选择加密的编码方式
            ///byte[] bytes = Encoding.GetEncoding("GB2312").GetBytes(signMsgVal);
            byte[]           bytes         = System.Text.Encoding.UTF8.GetBytes(signMsgVal);
            byte[]           SignatureByte = Convert.FromBase64String(signMsg);
            X509Certificate2 cert          = new X509Certificate2(Server.MapPath("99bill.cert.rsa.20140728.cer"), "");
            //X509Certificate2 cert = new X509Certificate2(Server.MapPath("99bill[1].cert.rsa.20140803.cer"), "");
            //X509Certificate2 cert = new X509Certificate2(Server.MapPath("99bill.cert.rsa.20340630.cer"), "");
            RSACryptoServiceProvider rsapri = (RSACryptoServiceProvider)cert.PublicKey.Key;

            rsapri.ImportCspBlob(rsapri.ExportCspBlob(false));
            RSAPKCS1SignatureDeformatter f = new RSAPKCS1SignatureDeformatter(rsapri);

            byte[] result;
            f.SetHashAlgorithm("SHA1");
            SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider();

            result = sha.ComputeHash(bytes);

            if (f.VerifySignature(result, SignatureByte))
            {
                string rurl       = string.Empty;
                var    YuMingInfo = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();
                rurl = "http://" + YuMingInfo.YuMing;

                //逻辑处理  写入数据库
                if (payResult == "10")
                {
                    //此处做商户逻辑处理
                    var info      = new EyouSoft.Model.YlStructure.MZaiXianZhiFuInfo();                              //在线支付实体
                    var onlinepay = new EyouSoft.BLL.YlStructure.BZaiXianZhiFu();                                    //在线支付BLL

                    info.DingDanId      = ext1;                                                                      //订单ID
                    info.DingDanLeiXing = (EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing)Convert.ToInt32(ext2); //订单类型
                    bool ispay = onlinepay.IsZhiFu(info.DingDanId, info.DingDanLeiXing);                             //获取订单支付状态(成功/失败)

                    if (info.DingDanLeiXing == EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.航期订单)
                    {
                        var dingdaninfo = new EyouSoft.BLL.YlStructure.BHangQiDingDan().GetDingDanInfo(info.DingDanId);
                        if (dingdaninfo != null)
                        {
                            rurl += "/hangqi/dingdanxx.aspx?dingdanid=" + info.DingDanId + "&dingdanleixing=" + (int)info.DingDanLeiXing + "&token=" + dingdaninfo.XiaDanRenId;
                        }
                    }
                    else if (info.DingDanLeiXing == EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.兑换订单)
                    {
                        var dingdaninfo = new EyouSoft.BLL.YlStructure.BDuiHuan().GetJiFenDingDanInfo(info.DingDanId);
                        rurl += "/hangqi/JiFenDingDanXX.aspx?dingdanid=" + info.DingDanId + "&dingdanleixing=" + (int)info.DingDanLeiXing + "&token=" + dingdaninfo.XiaDanRenId;
                    }

                    if (!ispay)
                    {
                        info.JiaoYiHao    = orderId;                                                        //流水号
                        info.ApiJiaoYiHao = dealId;                                                         //支付流水号
                        info.JinE         = Utils.GetDecimal(orderAmount) / 100M;                           //支付金额
                        info.ZhiFuFangShi = EyouSoft.Model.EnumType.YlStructure.ZaiXianZhiFuFangShi.Bill99; //支付方式
                        info.IsZhiFu      = true;                                                           //是否已支付
                        info.ZhiFuTime    = DateTime.Now;                                                   //支付时间
                        int bllRetCode = onlinepay.Insert(info);                                            //添加支付记录
                        if (bllRetCode == 1)
                        {
                            //实现其它操作处理
                            switch (info.DingDanLeiXing)
                            {
                            case EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.兑换订单:
                                HandlerJiFenDingDan(info.DingDanId);
                                break;

                            case EyouSoft.Model.EnumType.YlStructure.DingDanLeiXing.航期订单:
                                HandlerHangQiDingDan(info.DingDanId);
                                break;
                            }
                        }
                    }

                    //以下是我们快钱设置的show页面,商户需要自己定义该页面。
                    Response.Write("<result>1</result>" + "<redirecturl>" + rurl + "</redirecturl>");
                }
                else
                {
                    //以下是我们快钱设置的show页面,商户需要自己定义该页面。
                    Response.Write("<result>1</result>" + "<redirecturl>" + rurl + "</redirecturl>");
                    //Response.Write("signMsgVal=" + "(" + signMsgVal + ")");
                    //Response.Write("</br>" + "signMsg =" + signMsg);
                    //Response.Write("</br>" + "错误");
                }
            }
            else
            {
                Response.Write("signMsgVal=" + "(" + signMsgVal + ")");
                Response.Write("</br>" + "signMsg =" + signMsg);
                Response.Write("</br>" + "错误");
            }
        }