Exemple #1
0
        /// <summary>
        /// init rpt
        /// </summary>
        void InitRpt()
        {
            var chaXun      = GetChaXunInfo();
            int recordCount = 0;

            pageIndex = UtilsCommons.GetPadingIndex();

            var items = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuans(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;
            }
        }
Exemple #2
0
        void Del()
        {
            var ids    = Utils.GetQueryStringValue("ids").Split(',');
            var msg    = string.Empty;
            var result = 0;

            if (ids != null && ids.Length > 0)
            {
                foreach (var id in ids)
                {
                    result = new EyouSoft.BLL.YlStructure.BHuiYuan().DeleteShouCangJia(this.HuiYuanInfo.CompanyId, this.HuiYuanInfo.HuiYuanId, id);
                }
            }
            if (result == 1)
            {
                msg = UtilsCommons.AjaxReturnJson("1", "删除成功");
            }
            else
            {
                msg = UtilsCommons.AjaxReturnJson("0", "删除失败");
            }
            Response.Clear();
            Response.Write(msg);
            Response.End();
        }
Exemple #3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            MYlHuiYuanInfo m       = null;
            bool           isLogin = EyouSoft.Security.Membership.YlHuiYuanProvider.IsLogin(out m);

            if (!isLogin)
            {
                Response.Redirect("/login.aspx?rurl=" + Server.UrlEncode(Request.Url.ToString()));
            }

            var huiYuanInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanInfo(m.HuiYuanId);

            if (huiYuanInfo != null)
            {
                var yuMingInfo = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();

                KeYongJiFen         = huiYuanInfo.KeYongJiFen;
                ShouCangShu         = huiYuanInfo.ShouCangShu;
                TuXiang             = string.IsNullOrEmpty(huiYuanInfo.TuXiang) ? "/images/default-head.jpg" : TuPian.F1("http://" + yuMingInfo.YuMing + huiYuanInfo.TuXiang, 104, 100);
                DaiFuKuanDingDanShu = huiYuanInfo.DaiFuKuanDingDanShu;
            }

            HuiYuanInfo = m;
        }
Exemple #4
0
        void initPage()
        {
            var huifu = new EyouSoft.BLL.YlStructure.BHuiYuan().GetWenDaInfo(Utils.GetQueryStringValue("id"));

            if (huifu != null)
            {
                txtHuiDa.Text = huifu.DaNeiRong;
            }
        }
Exemple #5
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", "点评成功"));
        }
Exemple #6
0
        /// <summary>
        /// 获取点评人
        /// </summary>
        /// <returns></returns>
        protected string getDPR(string optid)
        {
            var model = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanInfo(optid);

            if (model == null)
            {
                return("");
            }
            return(model.XingMing);
        }
Exemple #7
0
        void InitInfo()
        {
            var info = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanInfo(EditId);

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

            txtYongHuMing.Value = info.Username;
        }
        void Save()
        {
            var result = 0;

            if (string.IsNullOrEmpty(Common.Utils.GetQueryStringValue("id")))
            {
                var h = new BLL.YlStructure.BHangQi().GetHangQiInfo(Common.Utils.GetQueryStringValue("hangqiid"));
                if (h != null)
                {
                    result = new BLL.YlStructure.BHuiYuan().InsertDianPing(new Model.YlStructure.MWzDianPingInfo()
                    {
                        DingDanId        = string.Empty,
                        CompanyId        = h.CompanyId,
                        GysId            = h.GysId,
                        GongSiId         = h.GongSiId,
                        XiLieId          = h.XiLieId,
                        ChuanZhiId       = h.ChuanZhiId,
                        HangQiId         = h.HangQiId,
                        RiQiId           = string.Empty,
                        NeiRong          = Common.Utils.GetFormValue(this.txtHuiDa.UniqueID),
                        IssueTime        = DateTime.Now,
                        OperatorId       = SiteUserInfo.UserId,
                        IsShenHe         = Common.Utils.GetFormValue(this.isshenhe.UniqueID) == "1",
                        ShenHeOperatorId = Common.Utils.GetFormValue(this.isshenhe.UniqueID) == "1" ? SiteUserInfo.UserId : string.Empty,
                        ShenHeTime       = Common.Utils.GetFormValue(this.isshenhe.UniqueID) == "1" ? DateTime.Now : new DateTime?(),
                        FenShu           = this.rdo1.Checked ? 1 : (this.rdo2.Checked ? 2 : (this.rdo3.Checked ? 3 : (this.rdo4.Checked ? 4 : 5))),
                        BiaoTi           = Common.Utils.GetFormValue(this.txtbiaoti.UniqueID)
                    });
                }
            }
            else
            {
                string dianpingid = Common.Utils.GetQueryStringValue("id");
                var    m          = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDianPingInfo(dianpingid);
                if (m == null)
                {
                    Common.Utils.RCWE(Common.UtilsCommons.AjaxReturnJson("0", "操作失败"));
                }
                m.FenShu           = this.rdo1.Checked ? 1 : (this.rdo2.Checked ? 2 : (this.rdo3.Checked ? 3 : (this.rdo4.Checked ? 4 : 5)));
                m.BiaoTi           = Common.Utils.GetFormValue(this.txtbiaoti.UniqueID);
                m.NeiRong          = Common.Utils.GetFormValue(this.txtHuiDa.UniqueID);
                m.IsShenHe         = Common.Utils.GetFormValue(this.isshenhe.UniqueID) == "1";
                m.ShenHeOperatorId = m.IsShenHe ? SiteUserInfo.UserId : string.Empty;
                m.ShenHeTime       = m.IsShenHe ? DateTime.Now : new DateTime?();
                result             = new EyouSoft.BLL.YlStructure.BHuiYuan().UpdateDianPing(m);
            }
            if (result == 1)
            {
                Common.Utils.RCWE(Common.UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            Common.Utils.RCWE(Common.UtilsCommons.AjaxReturnJson("0", "操作失败"));
        }
Exemple #9
0
        void setState()
        {
            int result = new EyouSoft.BLL.YlStructure.BHuiYuan().ShenHeDianPing(SiteUserInfo.CompanyId, SiteUserInfo.UserId, Utils.GetQueryStringValue("id"));

            if (result == 1)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
        }
Exemple #10
0
        void Submit()
        {
            var u = Utils.GetFormValue("txtYongHuMing");
            var b = new EyouSoft.BLL.YlStructure.BHuiYuan();
            var m = b.GetHuiYuanInfo(YuMingInfo.CompanyId, u, 1);

            if (!string.IsNullOrEmpty(u) && m != null)
            {
                MD5CryptoServiceProvider hashMD5 = new MD5CryptoServiceProvider();
                var newMM = Rand.Str(6);//随机生成6位字母与数字新密码
                if (b.SheZhiHuiYuanMiMa(m.HuiYuanId, m.MD5Password, BitConverter.ToString(hashMD5.ComputeHash(Encoding.Default.GetBytes(newMM))).Replace("-", "").ToLower()) <= 0)
                {
                    Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "提交失败!"));
                    return;
                }
                //如果手机存在则短信提醒会员
                if (!string.IsNullOrEmpty(m.ShouJi))
                {
                    string content = "您的登陆密码是:" + newMM;
                    if (EyouSoft.Toolkit.Utils.ProxySMS(m.ShouJi, content))
                    {
                        Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "提交成功!"));
                    }
                    else
                    {
                        Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "提交失败!"));
                    }
                }
                //不存在则邮件提醒会员
                else
                {
                    var mail = new Adpost.Common.Mail.EmailHelper {
                        Subject = "取回密码", Body = "尊敬的" + m.XingMing + "会员:您好!<br/>请妥善保管好您的新密码:" + newMM, ReceiveAddress = m.YouXiang, SenderName = "维诗达游轮"
                    };
                    //邮件接收的地址
                    if (mail.Send())
                    {
                        Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "提交成功!"));
                    }
                    else
                    {
                        Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "提交失败!"));
                    }
                }
            }
            else
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "用户名/邮箱不存在!"));
            }
        }
Exemple #11
0
        void GetDianPing()
        {
            string dingDanId = Utils.GetFormValue("txtDingDanId");
            var    info      = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDianPingInfo1(dingDanId);

            if (info == null)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0"));
            }

            var d = new { DianPingId = info.DianPingId, BiaoTi = info.BiaoTi, NeiRong = info.NeiRong, FenShu = (int)Math.Ceiling(info.FenShu), IsShenHe = info.IsShenHe };

            Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "", d));
        }
Exemple #12
0
        protected void InitInfo()
        {
            string id        = Utils.GetQueryStringValue("jfid");
            int    fangshiId = Utils.GetInt(Utils.GetQueryStringValue("fsid"));
            int    Sum       = Utils.GetInt(Utils.GetQueryStringValue("jfsum"));

            EyouSoft.BLL.YlStructure.BDuiHuan DuiHuan = new EyouSoft.BLL.YlStructure.BDuiHuan();
            var jiinfo = DuiHuan.GetJiFenShangPinInfo(id);

            if (!isLogin)
            {
                Response.Redirect("jifeninfo.aspx?id=" + id);
            }
            if (jiinfo == null)
            {
                Response.Redirect("jifenlist.aspx");
            }
            if (Sum < 1)
            {
                Response.Redirect("jifenlist.aspx");
            }

            if (isLogin && jiinfo != null && Sum >= 1)
            {
                HidKuaiDiJinE.Value = jiinfo.FaPiaoKuaiDiJinE.ToString("F2");

                #region 地址
                int recordCount = 0;
                EyouSoft.BLL.YlStructure.BHuiYuan bll = new EyouSoft.BLL.YlStructure.BHuiYuan();
                EyouSoft.Model.YlStructure.MHuiYuanDiZhiChaXunInfo chaxun = new MHuiYuanDiZhiChaXunInfo()
                {
                    HuiYuanId = m.HuiYuanId
                };
                var list = bll.GetDiZhis(YuMingInfo.CompanyId, 20, 1, ref recordCount, chaxun);
                rptList.DataSource = list;
                rptList.DataBind();
                #endregion

                #region 积分产品详细
                txtjfName.Text = jiinfo.MingCheng;
                txtJinE.Text   = JinEHtml(jiinfo.FangShis, fangshiId, Sum);
                txtSum.Text    = Sum.ToString();
                #endregion
            }
            else
            {
                RCWE("异常请求");
            }
        }
Exemple #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Utils.GetQueryStringValue("dotype") == "save")
            {
                this.Save();
            }

            var huiYuanInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanInfo(HuiYuanInfo.HuiYuanId);

            if (huiYuanInfo != null)
            {
                var yuMingInfo = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();
                TuXiang = string.IsNullOrEmpty(huiYuanInfo.TuXiang) ? "/images/default-head.jpg" : TuPian.F1("http://" + yuMingInfo.YuMing + huiYuanInfo.TuXiang, 235, 235);
            }
        }
Exemple #14
0
        /// <summary>
        /// 默认地址
        /// </summary>
        /// <returns></returns>
        protected string IsAddress()
        {
            string DiZhiId = Utils.GetQueryStringValue("dz"); int strId = 0; string str = "默认地址设置失败!";

            if (DiZhiId != null)
            {
                if (!string.IsNullOrEmpty(DiZhiId.ToString()))
                {
                    EyouSoft.BLL.YlStructure.BHuiYuan bll = new EyouSoft.BLL.YlStructure.BHuiYuan();
                    strId = bll.SheZhiMoRenDiZhi(m.HuiYuanId, DiZhiId.ToString());
                    str   = "默认地址设置成功!";
                }
            }
            return(UtilsCommons.AjaxReturnJson(strId > 0 ? "1" : "0", str));
        }
Exemple #15
0
        /// <summary>
        /// 设置会员状态
        /// </summary>
        /// <param name="status"></param>
        void SheZhiHuiYuanStatus(EyouSoft.Model.EnumType.YlStructure.HuiYuanStatus status)
        {
            string txtHuiYuanId = Utils.GetFormValue("txtHuiYuanId");

            int bllRetCode = new EyouSoft.BLL.YlStructure.BHuiYuan().SheZhiHuiYuanStatus(txtHuiYuanId, status);

            if (bllRetCode == 1)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
        }
Exemple #16
0
        void BaoCun()
        {
            string yonghuming = Utils.GetFormValue(txtYongHuMing.UniqueID);
            string mima       = Utils.GetFormValue(txtMiMa.UniqueID);

            if (string.IsNullOrEmpty(yonghuming))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "用户名不能为空"));
            }
            if (yonghuming.Length > 50)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "异常请求"));
            }
            if (!string.IsNullOrEmpty(mima) && mima.Length > 50)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "异常请求"));
            }
            if (string.IsNullOrEmpty(EditId))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "异常请求"));
            }

            int bllRetCode = new EyouSoft.BLL.YlStructure.BHuiYuan().SetHuiYuanUsername(EditId, yonghuming);

            if (bllRetCode == 1)
            {
                if (!string.IsNullOrEmpty(mima))
                {
                    var pwd = new EyouSoft.Model.ComStructure.MPasswordInfo();
                    pwd.NoEncryptPassword = mima;

                    new EyouSoft.BLL.YlStructure.BHuiYuan().SetHuiYuanMiMa(EditId, pwd.MD5Password);
                }
            }

            if (bllRetCode == 1)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else if (bllRetCode == -98)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:用户名已存在"));
            }
            else
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
        }
Exemple #17
0
        protected void initData(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                Response.Redirect("jifenlist.aspx");
            }

            MYlHuiYuanInfo userInfo = null;
            bool           IsLogin  = EyouSoft.Security.Membership.YlHuiYuanProvider.IsLogin(out userInfo);

            if (IsLogin)
            {
                var huiYuanInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanInfo(userInfo.HuiYuanId);
                phlLoginY.Visible = false;
                phLoginIn.Visible = true;
                ltr_jfNumber.Text = huiYuanInfo.KeYongJiFen.ToString("0.00");
                //ltr_jfCar.Text = "";
            }
            var model = new EyouSoft.BLL.YlStructure.BDuiHuan().GetJiFenShangPinInfo(id);

            if (model == null)
            {
                Response.Redirect("jifenlist.aspx");
            }

            if (model != null)
            {
                span_Shenyu.InnerText = model.ShengYuShuLiang.ToString();
                span_JfName.InnerText = model.MingCheng;
                ltr_function.Text     = DuiHuanStr(model.FangShis);
                span_PS.InnerText     = model.PeiSongFangShi;
                //span_Shenyu.InnerText=model.s
                ltr_shuoming.Text = model.ShuoMing;
                ltr_duihuan.Text  = model.XuZhi;
                if (model.FuJians != null && model.FuJians.Count > 0)
                {
                    rptList1.DataSource = model.FuJians;
                    rptList1.DataBind();
                    rptList2.DataSource = model.FuJians;
                    rptList2.DataBind();
                }
            }
        }
Exemple #18
0
        void initPage()
        {
            int recordCount = 0;

            pageIndex = UtilsCommons.GetPadingIndex();
            var list = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDianPings(SiteUserInfo.CompanyId, pageSize, pageIndex, ref recordCount, new EyouSoft.Model.YlStructure.MWzDianPingChaXunInfo()
            {
            });

            if (list != null && list.Count > 0)
            {
                rptlist.DataSource = list;
                rptlist.DataBind();
                phEmpty.Visible       = false;
                paging.UrlParams      = Request.QueryString;
                paging.intPageSize    = pageSize;
                paging.CurrencyPage   = pageIndex;
                paging.intRecordCount = recordCount;
            }
        }
Exemple #19
0
        void HuiFu()
        {
            string huifuID = Utils.GetQueryStringValue("id");
            var    huifu   = new EyouSoft.BLL.YlStructure.BHuiYuan().GetWenDaInfo(huifuID);

            if (huifu == null)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
            huifu.DaNeiRong    = Utils.GetFormValue(txtHuiDa.UniqueID);
            huifu.DaShiJian    = DateTime.Now;
            huifu.DaOperatorId = SiteUserInfo.UserId;
            int result = new EyouSoft.BLL.YlStructure.BHuiYuan().HuiFuWenDa(huifu);

            if (result == 1)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
        }
Exemple #20
0
        /// <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> ";
                }
            }
        }
Exemple #21
0
        /// <summary>
        /// 地址添加
        /// </summary>
        /// <returns></returns>
        protected string AddressSava()
        {
            string str = ""; int strId = 0;

            if (m != null)
            {
                #region 赋值
                string            Name     = Utils.GetFormValue("txtName");
                string            Tell     = Utils.GetFormValue("txtTell");
                int               province = Utils.GetInt(Utils.GetFormValue("sel_province"));
                int               city     = Utils.GetInt(Utils.GetFormValue("sel_city"));
                int               country  = Utils.GetInt(Utils.GetFormValue("sel_country"));
                string            Adress   = Utils.GetFormValue("txtAdress");
                string            Zip      = Utils.GetFormValue("txtZip");
                MHuiYuanDiZhiInfo model    = new MHuiYuanDiZhiInfo()
                {
                    HuiYuanId  = m.HuiYuanId,
                    ShengFenId = province,
                    ChengShiId = city,
                    XianQuId   = country,
                    DiZhi      = Adress,
                    YouBian    = Zip,
                    XingMing   = Name,
                    DianHua    = Tell
                };
                #endregion

                #region 判断
                if (string.IsNullOrEmpty(model.XingMing))
                {
                    str = "-收件人不能为空!</br>";
                }
                if (string.IsNullOrEmpty(model.DianHua))
                {
                    str += "-联系电话不能为空!</br>";
                }
                if (model.ShengFenId == 0)
                {
                    str += "-请选择省份!</br>";
                }
                if (model.ChengShiId == 0)
                {
                    str += "-请选择城市!</br>";
                }
                if (model.XianQuId == 0)
                {
                    str += "-请选择县区!</br>";
                }
                if (string.IsNullOrEmpty(model.DiZhi))
                {
                    str += "-邮寄地址不能为空!</br>";
                }
                if (string.IsNullOrEmpty(model.YouBian))
                {
                    str += "-邮政编码!</br>";
                }
                #endregion
                if (str != "")
                {
                    return(UtilsCommons.AjaxReturnJson("0", str));
                }
                EyouSoft.BLL.YlStructure.BHuiYuan bll = new EyouSoft.BLL.YlStructure.BHuiYuan();
                strId = bll.InsertDiZhi(model);
                if (strId > 0)
                {
                    return(UtilsCommons.AjaxReturnJson("1", "添加成功!", new { DiZhiid = model.DiZhiId }));
                }
                else
                {
                    return(UtilsCommons.AjaxReturnJson("0", "添加失败", new { DiZhiId = string.Empty }));
                }
            }
            return(UtilsCommons.AjaxReturnJson(strId > 0 ? "1" : "0", str));
        }
Exemple #22
0
        /// <summary>
        /// 积分兑换
        /// </summary>
        /// <returns></returns>
        protected string DingDanSava()
        {
            string id        = Utils.GetQueryStringValue("jfid");
            int    Sum       = Utils.GetInt(Utils.GetQueryStringValue("jfsum"));
            int    fangshiId = Utils.GetInt(Utils.GetQueryStringValue("fsid"));
            string dizhi     = Utils.GetFormValue(hidAddressId.UniqueID);
            string str       = "";

            EyouSoft.BLL.YlStructure.BDuiHuan bll = new EyouSoft.BLL.YlStructure.BDuiHuan();
            var DuiHuan = bll.GetJiFenShangPinInfo(id);

            if (DuiHuan == null)
            {
                return(UtilsCommons.AjaxReturnJson("0", "兑换的积分商品不存在"));
            }

            if (DuiHuan.Status == EyouSoft.Model.EnumType.YlStructure.JiFenShangPinStatus.架)
            {
                return(UtilsCommons.AjaxReturnJson("0", "商品已下架,不能兑换"));
            }

            if (!isLogin)
            {
                return(UtilsCommons.AjaxReturnJson("0", "请登录后再兑换"));
            }

            var JfFangShi = DuiHuan.FangShis.Where(n => (int)n.FangShi == fangshiId).ToList();

            #region 赋值
            /// <summary>
            /// 商品编号
            /// </summary>
            string ShangPinId = id;
            /// <summary>
            /// 公司编号
            /// </summary>
            string CompanyId = YuMingInfo.CompanyId;

            /// <summary>
            /// 数量
            /// </summary>
            int ShuLiang = Sum;
            /// <summary>
            /// 兑换方式
            /// </summary>
            EyouSoft.Model.EnumType.YlStructure.JiFenDuiHuanFangShi FangShi = JfFangShi[0].FangShi;

            /// <summary>
            /// 积分
            /// </summary>
            decimal JiFen = JfFangShi[0].JiFen * Sum;
            /// <summary>
            /// 订单状态
            /// </summary>
            EyouSoft.Model.EnumType.YlStructure.JiFenDingDanStatus DingDanStatus = EyouSoft.Model.EnumType.YlStructure.JiFenDingDanStatus.未处理;
            /// <summary>
            /// 付款状态
            /// </summary>
            EyouSoft.Model.EnumType.YlStructure.FuKuanStatus FuKuanStatus = EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款;
            /// <summary>
            /// 下单备注
            /// </summary>
            string XiaDanBeiZhu = "";
            /// <summary>
            /// 预订人姓名
            /// </summary>
            string YuDingRenName = "";
            /// <summary>
            /// 预订人电话
            /// </summary>
            string YuDingRenDianHua = "";
            /// <summary>
            /// 预订人手机
            /// </summary>
            string YuDingRenShouJi = "";
            /// <summary>
            /// 预订人邮箱
            /// </summary>
            string YuDingRenYouXiang = "";
            /// <summary>
            /// 是否需要发票
            /// </summary>
            bool IsXuYaoFaPiao = Utils.GetInt(Utils.GetFormValue(hidIsFapiao.UniqueID)) == 1 ? true : false;
            /// <summary>
            /// 发票抬头
            /// </summary>
            string FaPiaoTaiTou = Utils.GetFormValue("txtFapTitle");
            /// <summary>
            /// 发票明细类型
            /// </summary>
            string FaPiaoLeiXing = "";
            /// <summary>
            /// 发票明细
            /// </summary>
            string FaPiaoMingXi = Utils.GetFormValue("txtFapMingx");
            /// <summary>
            /// 发票配送方式
            /// </summary>
            EyouSoft.Model.EnumType.YlStructure.FaPiaoPeiSongFangShi FaPiaoPeiSongFangShi = EyouSoft.Model.EnumType.YlStructure.FaPiaoPeiSongFangShi.快递;
            /// <summary>
            /// 发票配送地址
            /// </summary>
            string FaPiaoDiZhiId = dizhi;
            /// <summary>
            /// 发票快递费用
            /// </summary>
            decimal FaPiaoKuaiDiJinE = 0;
            if (IsXuYaoFaPiao)
            {
                FaPiaoKuaiDiJinE = DuiHuan.FaPiaoKuaiDiJinE;
            }
            /// <summary>
            /// 下单人编号
            /// </summary>
            string XiaDanRenId = m.HuiYuanId;
            /*******************金额计算***********************************************************/
            /// <summary>
            /// 金额
            /// </summary>
            decimal JinE = JfFangShi[0].JinE * Sum;
            if (IsXuYaoFaPiao)
            {
                JinE = JinE + FaPiaoKuaiDiJinE;
            }

            /******************************************************************************/
            #endregion

            EyouSoft.Model.YlStructure.MWzJiFenDingDanInfo info = new MWzJiFenDingDanInfo()
            {
                ShangPinId           = ShangPinId,
                CompanyId            = CompanyId,
                ShuLiang             = ShuLiang,
                FangShi              = FangShi,
                JinE                 = JinE,
                JiFen                = JiFen,
                DingDanStatus        = DingDanStatus,
                FuKuanStatus         = FuKuanStatus,
                XiaDanBeiZhu         = XiaDanBeiZhu,
                YuDingRenName        = YuDingRenName,
                YuDingRenDianHua     = YuDingRenDianHua,
                YuDingRenShouJi      = YuDingRenShouJi,
                YuDingRenYouXiang    = YuDingRenYouXiang,
                IsXuYaoFaPiao        = IsXuYaoFaPiao,
                FaPiaoTaiTou         = FaPiaoTaiTou,
                FaPiaoLeiXing        = FaPiaoLeiXing,
                FaPiaoMingXi         = FaPiaoMingXi,
                FaPiaoPeiSongFangShi = FaPiaoPeiSongFangShi,
                FaPiaoDiZhiId        = FaPiaoDiZhiId,
                FaPiaoKuaiDiJinE     = FaPiaoKuaiDiJinE,
                XiaDanRenId          = XiaDanRenId
            };

            if (info.JinE <= 0 && info.JiFen <= 0)
            {
                str += "兑换积分产品数量小于1!</br>";
            }
            if (Sum < 1)
            {
                str += "兑换积分产品数量小于1!</br>";
            }
            if (info.IsXuYaoFaPiao && string.IsNullOrEmpty(info.FaPiaoDiZhiId))
            {
                str += "请选择配送地址!</br>";
            }

            if (!string.IsNullOrEmpty(str))
            {
                return(UtilsCommons.AjaxReturnJson("0", str));
            }

            decimal keYongJiFen = 0;
            var     huiYuanInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanInfo(m.HuiYuanId);
            if (huiYuanInfo != null)
            {
                keYongJiFen = huiYuanInfo.KeYongJiFen;
            }

            if (keYongJiFen < info.JiFen)
            {
                return(UtilsCommons.AjaxReturnJson("0", "你的可用积分不足!"));
            }

            int bllRetCode = bll.InsertJiFenDingDan(info);

            if (bllRetCode == 1)
            {
                var tj = bll.GetJiFenDingDanInfo(info.DingDanId);
                return(UtilsCommons.AjaxReturnJson("1", "兑换成功", new { DingDanId = info.DingDanId, FangShi = (int)info.FangShi, JinE = info.JinE, FuKuanState = (int)tj.FuKuanStatus }));
            }
            else
            {
                return(UtilsCommons.AjaxReturnJson("0", "兑换失败"));
            }
        }
Exemple #23
0
        /// <summary>
        /// init info
        /// </summary>
        void InitInfo()
        {
            var chaXun = GetChaXunInfo();
            var items  = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanDingDans(HuiYuanInfo.HuiYuanId, pageSize, pageIndex, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                StringBuilder s = new StringBuilder();
                foreach (var item in items)
                {
                    string  s1    = string.Empty; //cp url
                    string  s2    = string.Empty; //dingdan status
                    string  s3    = string.Empty; //zhifu url
                    string  s4    = string.Empty; //dingdan url
                    var     dp    = string.Empty; //点评
                    decimal jiFen = 0;

                    s3 = string.Format("/Hangqi/OrderPay.aspx?dingdanleixing={0}&dingdanid={1}&token={2}", (int)item.DingDanLeiXing, item.DingDanId, item.HuiYuanId);


                    #region s1
                    if (item.DingDanLeiXing == DingDanLeiXing.航期订单)
                    {
                        if (item.IsTuanGou)
                        {
                            s1 = "/tuangou/tuangouxiangqing.aspx?tuangouid=" + item.TuanGouId;
                        }
                        else
                        {
                            if (item.HQLeiXing.Value == YouLunLeiXing.长江游轮)
                            {
                                s1 = "/hangqi/" + item.CPId + ".html";
                            }
                            else if (item.HQLeiXing.Value == YouLunLeiXing.海洋邮轮)
                            {
                                s1 = "/hangqi/HY" + item.CPId + ".html";
                            }
                        }

                        jiFen = item.JiFen;
                    }
                    else if (item.DingDanLeiXing == DingDanLeiXing.兑换订单)
                    {
                        s1    = "/jifen/jifeninfo.aspx?id=" + item.CPId;
                        jiFen = 0 - item.JiFen;
                    }
                    #endregion

                    #region s2
                    if (item.FuKuanStatus == FuKuanStatus.未付款)
                    {
                        if (item.DingDanLeiXing == DingDanLeiXing.兑换订单)
                        {
                            switch (item.JFStatus.Value)
                            {
                            case JiFenDingDanStatus.未处理: s2 = "<font>审核中</font>"; break;

                            case JiFenDingDanStatus.已成交: s2 = string.Format("<a class='fukuan' href='{0}'>付款</a>", s3); break;

                            case JiFenDingDanStatus.已取消: s2 = "<font class='color_b'>已取消</font>"; break;
                            }
                        }
                        else if (item.DingDanLeiXing == DingDanLeiXing.航期订单)
                        {
                            switch (item.HQStatus.Value)
                            {
                            case HangQiDingDanStatus.受理: s2 = "<font>审核中</font>"; break;

                            case HangQiDingDanStatus.成交: s2 = string.Format("<a class='fukuan' href='{0}'>付款</a>", s3); break;

                            case HangQiDingDanStatus.留位: s2 = "<font>审核中</font>"; break;

                            case HangQiDingDanStatus.留位过期: s2 = "<font>审核中</font>"; break;

                            case HangQiDingDanStatus.取消: s2 = "<font class='color_b'>已取消</font>"; break;

                            case HangQiDingDanStatus.审核中: s2 = "<font>审核中</font>"; break;

                            case HangQiDingDanStatus.未处理: s2 = "<font>审核中</font>"; break;
                            }
                            dp = "<span>&nbsp;<a href='javascript:void(0)' class='i_dianping'>【点评】</a></span>";
                        }
                    }
                    else if (item.FuKuanStatus == FuKuanStatus.已付款)
                    {
                        if (item.DingDanLeiXing == DingDanLeiXing.航期订单)
                        {
                            s2 = "<font class='green'>已完成</font>";
                            dp = "<span>&nbsp;<a href='javascript:void(0)' class='i_dianping'>【点评】</a></span>";
                        }
                        else
                        {
                            s2 = "<font class='green'>已完成</font>";
                        }
                    }
                    #endregion

                    #region s4
                    if (item.DingDanLeiXing == DingDanLeiXing.航期订单)
                    {
                        s4 = "/hangqi/dingdanxx.aspx?dingdanleixing=" + (int)item.DingDanLeiXing + "&dingdanid=" + item.DingDanId + "&token=" + item.HuiYuanId;
                    }
                    else if (item.DingDanLeiXing == DingDanLeiXing.兑换订单)
                    {
                        s4 = "/hangqi/jifendingdanxx.aspx?dingdanleixing=" + (int)item.DingDanLeiXing + "&dingdanid=" + item.DingDanId + "&token=" + item.HuiYuanId;
                    }
                    #endregion

                    s.AppendFormat("<tr i_dingdanid='{0}' i_dingdanleixing='{1}'>", item.DingDanId, (int)item.DingDanLeiXing);

                    s.AppendFormat("<td align='left'><a class='blue' target='_blank' href='{1}'>{0}</a> <a class='price_fontred' href='{2}'>【详情】</a>{3}</td>", item.CPName, s1, s4, dp);
                    s.AppendFormat("<td align='center'><b class='price_fontred font14'>{0}</b></td>", item.JinE.ToString("F2"));
                    s.AppendFormat("<td align='center'><b class='font14 font_yellow'>{0}</b></td>", jiFen.ToString("F2"));
                    s.AppendFormat("<td align=\"center\">{0}</td>", s2);

                    s.Append("</tr>");
                }
                ltr0.Text = s.ToString();

                RegisterScript(string.Format("pConfig.pageSize={0};pConfig.pageIndex={1};pConfig.recordCount={2};", pageSize, pageIndex, recordCount));
            }
            else
            {
                this.phdNoDat.Visible = true;
            }
        }
        /// <summary>
        /// init edit info
        /// </summary>
        void InitEditInfo()
        {
            if (string.IsNullOrEmpty(DingDanId))
            {
                return;
            }

            var info = new EyouSoft.BLL.YlStructure.BLiPinKa().GetLiPinKaDingDanInfo(DingDanId);

            if (info == null)
            {
                return;
            }

            ltrDingDanHao.Text       = info.JiaoYiHao;
            ltrLiPinKaMingCheng.Text = info.LiPinKaMingCheng;
            ltrLiPinKaJinE.Text      = info.JinE1.ToString("F2");
            ltrLiPinKaLeiXing.Text   = info.LiPinKaLeiXing.ToString();
            ltrHuiYuanXingMing.Text  = info.HuiYuanXingMing;
            ltrShuLiang.Text         = info.ShuLiang.ToString();
            ltrJinE.Text             = info.JinE.ToString("F2");
            ltrDingDanStatus.Text    = info.DingDanStatus.ToString();
            ltrFuKuanStatus.Text     = info.FuKuanStatus.ToString();
            if (info.IsXuYaoFaPiao)
            {
                ltrFaPiao.Text = "发票抬头:" + info.FaPiaoTaiTou + "<br/>发票明细:" + info.FaPiaoMingXi;

                if (info.FaPiaoPeiSongFangShi == EyouSoft.Model.EnumType.YlStructure.FaPiaoPeiSongFangShi.快递)
                {
                    if (!string.IsNullOrEmpty(info.FaPiaoDiZhiId))
                    {
                        var diZhiInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDiZhiInfo(info.FaPiaoDiZhiId);
                        if (diZhiInfo != null)
                        {
                            var    citybll = new EyouSoft.BLL.ComStructure.BComCity();
                            var    CPCD    = citybll.GetCPCD(CurrentUserCompanyID, diZhiInfo.GuoJiaId, diZhiInfo.ShengFenId, diZhiInfo.ChengShiId, diZhiInfo.XianQuId);
                            string s       = string.Empty;
                            if (CPCD != null)
                            {
                                s = CPCD.CountryName + "-" + CPCD.ProvinceName + "-" + CPCD.CityName + "-" + CPCD.CountyName + "&nbsp;";
                            }

                            ltrPeiSongFangShi.Text = "快递<br/>地址:" + s + diZhiInfo.DiZhi + "&nbsp;邮编:" + diZhiInfo.YouBian + "<br/>收件人:" + diZhiInfo.XingMing + "&nbsp;&nbsp;" + diZhiInfo.DianHua;
                        }
                    }
                }
                else
                {
                    ltrPeiSongFangShi.Text = "自取";
                }
            }
            else
            {
                ltrFaPiao.Text = "无需发票";
            }

            ltrXiaDanShiJian.Text = info.IssueTime.ToString();
            ltrZengYu.Text        = info.ZengYu;

            if (!string.IsNullOrEmpty(info.SlrDiZhiId))
            {
                var diZhiInfo = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDiZhiInfo(info.SlrDiZhiId);
                if (diZhiInfo != null)
                {
                    ltrSlrXingMing.Text = diZhiInfo.XingMing;
                    var    citybll = new EyouSoft.BLL.ComStructure.BComCity();
                    var    CPCD    = citybll.GetCPCD(CurrentUserCompanyID, diZhiInfo.GuoJiaId, diZhiInfo.ShengFenId, diZhiInfo.ChengShiId, diZhiInfo.XianQuId);
                    string s       = string.Empty;
                    if (CPCD != null)
                    {
                        s = CPCD.CountryName + "-" + CPCD.ProvinceName + "-" + CPCD.CityName + "-" + CPCD.CountyName + "&nbsp;";
                    }

                    ltrSlrDiZhi.Text = "地址:" + s + diZhiInfo.DiZhi + "&nbsp;邮编:" + diZhiInfo.YouBian + "<br/>收件人:" + diZhiInfo.XingMing + "&nbsp;&nbsp;" + diZhiInfo.DianHua;
                }
            }

            if (info.DingDanStatus != EyouSoft.Model.EnumType.YlStructure.LiPinKaDingDanStatus.已取消 &&
                info.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款)
            {
                phQuXiao.Visible = true;
            }
        }
Exemple #25
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
        }
Exemple #26
0
        void InitInfo()
        {
            var chaXun = GetChaXunInfo();
            var items  = new EyouSoft.BLL.YlStructure.BHuiYuan().GetHuiYuanJiFenMingXis(HuiYuanInfo.HuiYuanId, pageSize, pageIndex, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                StringBuilder s = new StringBuilder();

                foreach (var item in items)
                {
                    string  s1    = string.Empty;//cp url
                    decimal jiFen = 0;
                    string  s2    = string.Empty;

                    switch (item.LeiXing)
                    {
                    case EyouSoft.Model.EnumType.YlStructure.JiFenMxLeiXing.积分兑换商品:
                        s1    = "/jifen/jifeninfo.aspx?id=" + item.CPId;
                        jiFen = 0 - item.JiFen;
                        s2    = "积分兑换商品";
                        break;

                    case EyouSoft.Model.EnumType.YlStructure.JiFenMxLeiXing.单抵扣积分:
                        jiFen = 0 - item.JiFen;
                        s2    = "下单抵扣积分";
                        if (item.IsTuanGou)
                        {
                            s1 = "/tuangou/tuangouxiangqing.aspx?tuangouid=" + item.TuanGouId;
                        }
                        else
                        {
                            if (item.HQLeiXing.Value == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.长江游轮)
                            {
                                s1 = "/hangqi/" + item.CPId + ".html";
                            }
                            else if (item.HQLeiXing.Value == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮)
                            {
                                s1 = "/hangqi/HY" + item.CPId + ".html";
                            }
                        }
                        break;

                    case EyouSoft.Model.EnumType.YlStructure.JiFenMxLeiXing.单累积积分:
                        jiFen = item.JiFen;
                        s2    = "下单累积积分";
                        if (item.IsTuanGou)
                        {
                            s1 = "/tuangou/tuangouxiangqing.aspx?tuangouid=" + item.TuanGouId;
                        }
                        else
                        {
                            if (item.HQLeiXing.Value == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.长江游轮)
                            {
                                s1 = "/hangqi/hangqiinfo.aspx?id=" + item.CPId;
                            }
                            else if (item.HQLeiXing.Value == EyouSoft.Model.EnumType.YlStructure.YouLunLeiXing.海洋邮轮)
                            {
                                s1 = "/hangqi/haiyanginfo.aspx?id=" + item.CPId;
                            }
                        }

                        break;
                    }

                    s.AppendFormat("<tr>");
                    s.AppendFormat("<td align='left'>{0}<a class='blue' target='_blank' href='{1}'>【详情】</a></td>", item.CPName, s1);
                    s.AppendFormat("<td align='center'>{0:yyyy-MM-dd}</td>", item.IssueTime);
                    s.AppendFormat("<td align='center'><b class='font14'>{0:F2}</b></td>", item.JinE);
                    s.AppendFormat("<td align='center'><b class='font14' title='{1}'>{0:F2}</b></td>", jiFen, s2);
                    s.AppendFormat("</tr>");
                }

                ltr0.Text = s.ToString();
            }
            else
            {
                phdNoDat.Visible = true;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            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("请求异常!");
            }


            var info = new EyouSoft.BLL.YlStructure.BDuiHuan().GetJiFenDingDanInfo(dingDanId);

            if (info == 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 (info.XiaDanRenId != token)
            {
                RCWE("请求异常");
            }
            if (isLogin && info.XiaDanRenId != huiYuanInfo.HuiYuanId)
            {
                RCWE("请求异常");
            }

            dingdanhao.Text = info.JiaoYiHao;

            dingdanzhuangtai.Text = info.FuKuanStatus.ToString();
            if (info.FuKuanStatus == EyouSoft.Model.EnumType.YlStructure.FuKuanStatus.未付款)
            {
                dingdanzhuangtai.Text = "<span style='color:#ff0000'>未付款</span>";
                if (info.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.JiFenDingDanStatus.已成交)
                {
                    ltr01.Text = "<a href=\"orderpay.aspx?dingdanleixing=" + (int)DingDanLeiXing.Value + "&dingdanid=" + dingDanId + "&token=" + token + "\" class=\"fukuan\">付款</a>";
                }
                else if (info.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.JiFenDingDanStatus.未处理)
                {
                    ltr01.Text = "审核中";
                }
                else if (info.DingDanStatus == EyouSoft.Model.EnumType.YlStructure.JiFenDingDanStatus.已取消)
                {
                    ltr01.Text = "已取消";
                }
                else
                {
                    ltr01.Text = string.Empty;
                }
            }

            shanpinjine.Text = info.ShangPinJinE.ToString("C2");

            string fangshi = string.Empty;

            if (info.FangShi == EyouSoft.Model.EnumType.YlStructure.JiFenDuiHuanFangShi.积分)
            {
                fangshi = "积分";
            }
            else if (info.FangShi == EyouSoft.Model.EnumType.YlStructure.JiFenDuiHuanFangShi.积分现金)
            {
                fangshi = "积分+现金";
            }
            duihuanfangshi.Text  = fangshi;
            duihuanjifen.Text    = info.JiFen.ToString("F2");
            duihuanjine.Text     = (info.JinE - info.FaPiaoKuaiDiJinE).ToString("C2");
            kuaidifei.Text       = info.FaPiaoKuaiDiJinE.ToString("C2");
            shifujine.Text       = info.JinE.ToString("C2");
            duihuanshuliang.Text = info.ShuLiang.ToString();

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

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

                #region 配送方式
                var dizhi = new EyouSoft.BLL.YlStructure.BHuiYuan().GetDiZhiInfo(info.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 : "", info.FaPiaoPeiSongFangShi);
                }
                #endregion
            }
            else
            {
                phFaPiao.Visible = false;
                phFaPiaoPeiSongFangShi.Visible = false;
            }
        }