Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string type      = Utils.GetQueryStringValue("type");
            string tuangouId = Utils.GetQueryStringValue("TuanGouId");

            if (type == "CheckPage")
            {
                RCWE(SelectProduct());
            }
            if (type == "sava")
            {
                RCWE(Sava());
            }
            if (type == "address")
            {
                RCWE(AddressSava());
            }
            if (type == "getdizhi")
            {
                GetDiZhi();
            }

            if (string.IsNullOrEmpty(tuangouId))
            {
                RCWE("请求异常");
            }
            Master.WeiZhi = EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.团购横幅;
            if (!IsPostBack)
            {
                BHangQi bll_hangqi = new BHangQi();
                Model = bll_hangqi.GetTuanGouInfo(tuangouId);
                if (Model == null)
                {
                    RCWE("请求异常");
                }

                EyouSoft.BLL.YlStructure.BJiChuXinXi bll_jichuxinxi = new BJiChuXinXi();
                EyouSoft.BLL.YlStructure.BHuiYuan    HuiYuan        = new EyouSoft.BLL.YlStructure.BHuiYuan();
                MJiChuXinXiChaXunInfo searchModel = new MJiChuXinXiChaXunInfo();
                Hangqi.Value     = Model.HangQiId;
                RiQiID.Value     = Model.RiQiId;
                FangXingID.Value = Model.FangXingId.ToString();
                TuanGouId.Value  = Model.TuanGouId;
                this.BinkeStr    = Model.BinKeLeiXing;


                MHangQiInfo   hangQiInfo   = bll_hangqi.GetHangQiInfo(Model.HangQiId);
                MChuanZhiInfo chuanZhiInfo = bll_jichuxinxi.GetChuanZhiInfo(hangQiInfo.ChuanZhiId);
                ChuanZhiId                = hangQiInfo.ChuanZhiId;
                AddressFree.Value         = hangQiInfo.FaPiaoKuaiDiJinE.ToString();
                KuaiDiJinE                = hangQiInfo.FaPiaoKuaiDiJinE;
                txt_YL_FeiYong.Text       = hangQiInfo.FeiYongShuoMing;
                txt_YL_YuDingXuZhi.Text   = hangQiInfo.YuDingXuZhi;
                txt_YL_YouQing.Text       = hangQiInfo.YouQingTiShi;
                txt_YL_YouLunGongLue.Text = hangQiInfo.GongLue;
                //this.FangxingStr = string.Join(",", chuanZhiInfo.FangXings.Select(x => x.MingCheng).ToArray());
                this.FangxingStr = JiChuXinXi(Model.FangXingId);

                #region 用户点评

                decimal FenShu      = HuiYuan.GetDianPingJunFen(Model.HangQiId);
                int     recordCount = 0;
                MWzDianPingChaXunInfo DianPingChaXun = new MWzDianPingChaXunInfo()
                {
                    HangQiId = Model.HangQiId,
                    IsShenHe = true
                };
                var DianPinglist = HuiYuan.GetDianPings(YuMingInfo.CompanyId, 5, 1, ref recordCount, DianPingChaXun);
                if (DianPinglist != null && DianPinglist.Count > 0)
                {
                    rptListDianPing.DataSource = DianPinglist;
                    rptListDianPing.DataBind();
                }
                string DianPingHtml = "";
                if (FenShu > 0)
                {
                    DianPingHtml += "<em>" + FenShu.ToString("F2") + "</em>分";
                }
                else
                {
                    DianPingHtml += "<em>0</em>分";
                }
                if (recordCount > 0)
                {
                    DianPingHtml += "(共" + recordCount + "人点评)";
                }
                else
                {
                    DianPingHtml += "(暂无点评)";
                }
                litYongHuDingPing.Text = DianPingHtml;
                #endregion

                #region 咨询问答
                int Count = 0;
                MWzWenDaChaXunInfo WenDaChaxun = new MWzWenDaChaXunInfo()
                {
                    HangQiId = Model.HangQiId,
                    IsHuiFu  = true
                };
                var WendaList = HuiYuan.GetWenDas(YuMingInfo.CompanyId, 5, 1, ref Count, WenDaChaxun);
                if (WendaList != null && WendaList.Count > 0)
                {
                    rptListZiXunWD.DataSource = WendaList;
                    rptListZiXunWD.DataBind();
                }

                #endregion

                Dengchuan_gangkou = JiChuXinXi(hangQiInfo.ChuFaGangKouId);
                Xiachuan_gangkou  = JiChuXinXi(hangQiInfo.DiDaGangKouId);

                this.Hangxian_XingZhi = hangQiInfo.HangXianXingZhi;

                this.TuJingChengShi = hangQiInfo.TuJingChengShi;
                this.TianShu1       = hangQiInfo.TianShu1;
                this.TianShu2       = hangQiInfo.TianShu2;


                JiaGes(Model.JiaGes.Select(x => new { LeiXingId = x.BinKeLeiXingId, MingCheng = JiChuXinXi(x.BinKeLeiXingId), JiaGe = x.JiaGe }).ToArray());

                YouLunInfo(chuanZhiInfo.ChuanZhiId);
                ChuanZhiId = chuanZhiInfo.ChuanZhiId;
                XingChengs(hangQiInfo.XingChengs);

                InsertHangQJiLu(hangQiInfo.HangQiId);

                ltrChangYongDiZhi.Text = GetDiZhiHtml();

                EyouSoft.Model.YlStructure.MWzKvInfo httk = null;

                if (hangQiInfo.LeiXing == YouLunLeiXing.长江游轮)
                {
                    httk = new EyouSoft.BLL.YlStructure.BWz().GetKvInfo(YuMingInfo.CompanyId, EyouSoft.Model.EnumType.YlStructure.WzKvKey.长江游轮合同条款);
                }
                if (hangQiInfo.LeiXing == YouLunLeiXing.海洋邮轮)
                {
                    httk = new EyouSoft.BLL.YlStructure.BWz().GetKvInfo(YuMingInfo.CompanyId, EyouSoft.Model.EnumType.YlStructure.WzKvKey.海洋邮轮合同条款);
                }
                if (httk != null && !string.IsNullOrEmpty(httk.V))
                {
                    ltrHeTongTiaoKuan.Text = httk.V;
                }
            }
        }