Exemple #1
0
        /// <summary>
        /// bangding
        /// </summary>
        void BangDing()
        {
            string txt_u = Utils.GetFormValue("txt_u");
            string txt_p = Utils.GetFormValue("txt_p");
            string huiYuanId;
            int    bllRetCode = new Eyousoft_yhq.BLL.BWeiXin().BangDingHuiYuan(YongHuId, weixin_openid, txt_u, txt_p, out huiYuanId);

            if (bllRetCode == 1)
            {
                EyouSoft.Model.SSOStructure.MUserInfo huiYuanInfo = null;
                int autoLoginRetCode = Eyousoft_yhq.BLL.MemberLogin.AutoLogin(huiYuanId, out huiYuanInfo);

                if (autoLoginRetCode == 1)
                {
                    Utils.RCWE_AJAX("1", "", huiYuanInfo.WeiDianId);
                }
                else
                {
                    Utils.RCWE_AJAX("异常登录");
                }
            }
            else if (bllRetCode == -98)
            {
                Utils.RCWE_AJAX("-98", "请填写正确的用户名或密码");
            }
            else if (bllRetCode == -97)
            {
                Utils.RCWE_AJAX("-97", "你的会员账号已经绑定过,不能重复绑定。");
            }
            else
            {
                Utils.RCWE_AJAX("0", "异常登录");
            }
        }
Exemple #2
0
        /// <summary>
        /// OnInit
        /// </summary>
        /// <param name="e"></param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            _IsLogin = Eyousoft_yhq.BLL.MemberLogin.IsLogin() == 1;

            if (_IsLogin)
            {
                var huiYuanInfo = Eyousoft_yhq.BLL.MemberLogin.GetLoginHuiYuanInfo();
                _HuiYuanInfo = huiYuanInfo;
            }

            _WeiDianId = Utils.GetWeiDianId();
            _SFZZ      = Utils.SFZZWeiDian();

            if (!(Request.Url.ToString().ToLower().IndexOf("/weidian/shenqing.aspx") > -1))
            {
                if (string.IsNullOrEmpty(_WeiDianId))
                {
                    Response.Redirect("NotFound.aspx");
                }

                var weiDianInfo = new Eyousoft_yhq.BLL.BWeiDian().GetInfo(_WeiDianId);
                if (weiDianInfo == null)
                {
                    Response.Redirect("NotFound.aspx");
                }

                if (weiDianInfo.Status == Eyousoft_yhq.Model.WeiDianStatus.申请中)
                {
                    Response.Redirect("NotFound.aspx?xxlx=1");
                }
            }
        }
Exemple #3
0
        private string UserLogin()
        {
            string un = Utils.GetFormValue(txtUserName.UniqueID);
            string pw = Utils.GetFormValue(txtPassWord.UniqueID);

            if (string.IsNullOrEmpty(un))
            {
                return(UtilsCommons.AjaxReturnJson("0", "请填写用户名!"));
            }
            if (string.IsNullOrEmpty(pw))
            {
                return(UtilsCommons.AjaxReturnJson("0", "请填写密码!"));
            }
            Eyousoft_yhq.BLL.MemberLogin          MLogin = new Eyousoft_yhq.BLL.MemberLogin();
            EyouSoft.Model.SSOStructure.MUserInfo Muser  = MLogin.isLogin(un, pw);

            bool isUserValid = Muser != null ? true : false;

            if (isUserValid)
            {
                return(UtilsCommons.AjaxReturnJson("1", "登陆成功"));
            }
            else
            {
                return(UtilsCommons.AjaxReturnJson("0", "手机号码或者密码错误!"));
            }
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //string loginUrl = string.Empty;

            //初始化用户信息,根据用户信息获取登录URL
            EyouSoft.Model.SSOStructure.MUserInfo userInfo = EyouSoft.Security.Membership.UserProvider.GetUserInfo();
            string goUrl = "/Login.aspx";

            if (userInfo != null)
            {
                if (userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.导游 || userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.内部员工)
                {
                    goUrl = "/Login.aspx";
                }
                if (userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.供应商)
                {
                    goUrl = "/Login.aspx";
                    // goUrl = "/GroupEnd/Suppliers/Login.aspx";
                }

                if (userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.组团社)
                {
                    goUrl = "/Login.aspx";
                    //goUrl = "/GroupEnd/Distribution/Login.aspx";
                }
            }

            EyouSoft.Security.Membership.UserProvider.Logout();
            Response.Redirect(goUrl);
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EyouSoft.Model.SSOStructure.MUserInfo userInfo = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
            if (userInfo != null)
            {
                isLogin = "******";
            }
            getHeadHtml();
            initFlights();

            WeiDianId = Utils.GetWeiDianId();
        }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     EyouSoft.Model.SSOStructure.MUserInfo userInfo = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
     if (userInfo != null)
     {
         Response.Redirect("/AppPage/updateuser.aspx");
     }
     if (IsPostBack)
     {
         save();
     }
 }
Exemple #7
0
        /// <summary>
        /// OnInit
        /// </summary>
        /// <param name="e"></param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            _IsLogin = Eyousoft_yhq.BLL.MemberLogin.IsLogin() == 1;

            if (_IsLogin)
            {
                var huiYuanInfo = Eyousoft_yhq.BLL.MemberLogin.GetLoginHuiYuanInfo();
                _HuiYuanInfo = huiYuanInfo;
            }

            _HOST = Request.Url.Host;
        }
Exemple #8
0
        /// <summary>
        /// OnInit
        /// </summary>
        /// <param name="e"></param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            _IsLogin = Eyousoft_yhq.BLL.MemberLogin.IsLogin() == 1;

            if (_IsLogin)
            {
                var huiYuanInfo = Eyousoft_yhq.BLL.MemberLogin.GetLoginHuiYuanInfo();
                _HuiYuanInfo = huiYuanInfo;
            }

            _HOST = Request.Url.Host;
        }
Exemple #9
0
        /// <summary>
        ///  抽奖
        /// </summary>
        void getFxResult()
        {
            EyouSoft.Model.SSOStructure.MUserInfo m = null;
            bool isLogin = EyouSoft.Common.Page.HuiyuanPage.IsLogin(out m);

            if (!isLogin)
            {
                Utils.RCWE_AJAX("0", "请登录后重新操作");
            }



            var hongbao = new Eyousoft_yhq.BLL.BHongBao().GetInfoByUserID(Utils.GetQueryStringValue("huiyuanid")); //判断是否存在红包

            if (hongbao == null)
            {
                return;
            }

            if (hongbao.HongBaoJinE <= 1M)
            {
                Utils.RCWE_AJAX("0", "红包被分光啦");
            }


            //判断用户当日是否已经抽奖
            bool isExists = new Eyousoft_yhq.BLL.BChouJiang().Exists(new Eyousoft_yhq.Model.ChouJiang()
            {
                CaoZuoRenID = m.UserID, ChouJiangShiJian = DateTime.Now, FangShi = JiangLiFangShi.分享
            });

            if (isExists)
            {
                Utils.RCWE_AJAX("0", "每天分享第一次才可以获得奖励");
            }

            Eyousoft_yhq.Model.ChouJiang info = new Eyousoft_yhq.Model.ChouJiang();
            info.ID          = hongbao.ID;
            info.CaoZuoRenID = m.UserID;
            info.JieGuo      = ChouJiangJieGuo.未中奖;
            info.DianShu     = 1M;
            info.FangShi     = JiangLiFangShi.分享;
            int result = new Eyousoft_yhq.BLL.BChouJiang().Insert(info);

            Utils.RCWE_AJAX(result == 1 ? "1" : "0", result == 1 ? "操作成功" : "操作失败");
            //抽奖
            //返回结果
        }
Exemple #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                string u           = Utils.GetFormValue("u");
                string p           = Utils.GetFormValue("p");
                string companyId   = string.Empty;
                int    isUserValid = 0;

                if (u.Trim() != "" && p.Trim() != "")
                {
                    EyouSoft.Model.SysStructure.MSysDomain sysDomain = EyouSoft.Security.Membership.UserProvider.GetDomain();
                    if (sysDomain != null)
                    {
                        companyId = sysDomain.CompanyId;
                    }

                    EyouSoft.Model.SSOStructure.MUserInfo userInfo = null;

                    EyouSoft.Model.ComStructure.MPasswordInfo pwdInfo = new EyouSoft.Model.ComStructure.MPasswordInfo();
                    pwdInfo.NoEncryptPassword = p;
                    isUserValid = EyouSoft.Security.Membership.UserProvider.Login(companyId, u, pwdInfo, out userInfo);

                    if (isUserValid == 1)
                    {
                        Response.Redirect("/m/Index.aspx?sl=" + ((int)EyouSoft.Model.EnumType.PrivsStructure.Privs.导游中心_导游报账_栏目).ToString());
                    }
                    else if (isUserValid == -4)
                    {
                        this.lblMsg.Text = "用户名或密码不正确";
                    }
                    else if (isUserValid == -7)
                    {
                        this.lblMsg.Text = "您的账户已停用或已过期,请联系管理员";
                    }
                    else
                    {
                        this.lblMsg.Text = "登录异常,请联系管理员";
                    }
                }
                else
                {
                    this.lblMsg.Text = "请输入用户名和密码!";
                }
            }
        }
Exemple #11
0
        /// <summary>
        /// login
        /// </summary>
        void Login1()
        {
            string txt_u = Utils.GetFormValue("txt_u");
            string txt_p = Utils.GetFormValue("txt_p");

            EyouSoft.Model.SSOStructure.MUserInfo huiYuanInfo = null;

            var bllRetCode = Eyousoft_yhq.BLL.MemberLogin.Login(txt_u, txt_p, out huiYuanInfo);

            if (bllRetCode == 1)
            {
                if (RT == "1")
                {
                    Utils.RCWE_AJAX("1", "登录成功", huiYuanInfo.WeiDianId);
                }

                Utils.RCWE_AJAX("1", "登录成功", "");
            }
            else
            {
                Utils.RCWE_AJAX("-98", "请填写正确的用户名或密码");
            }
        }
Exemple #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string u        = Utils.InputText(Request.QueryString["u"]);
            string p        = Utils.InputText(Request.QueryString["p"]);
            string pmd      = Utils.InputText(Request.QueryString["pmd"]);
            string vc       = Utils.InputText(Request.QueryString["vc"]);
            string callback = Utils.InputText(Request.QueryString["callback"]);

            var domain = EyouSoft.Security.Membership.UserProvider.GetDomain();

            if (domain == null || string.IsNullOrEmpty(domain.CompanyId))
            {
                Response.Clear();
                Response.Write(";" + callback + "({m:'系统域名配置错误'});");
                Response.End();
            }

            string weiHuXiaoXi;

            if (EyouSoft.Security.Membership.UserProvider.IsSysWeiHu(out weiHuXiaoXi))
            {
                Response.Clear();
                Response.Write(";" + callback + "({m:'" + weiHuXiaoXi + "'});");
                Response.End();
            }

            string companyId = domain.CompanyId;

            int isUserValid = 0;

            EyouSoft.Model.SSOStructure.MUserInfo userInfo = null;

            EyouSoft.Model.ComStructure.MPasswordInfo pwdInfo = new EyouSoft.Model.ComStructure.MPasswordInfo();
            pwdInfo.NoEncryptPassword = p;
            isUserValid = EyouSoft.Security.Membership.UserProvider.Login(companyId, u, pwdInfo, out userInfo);

            if (isUserValid == 1)
            {
                string html = "";
                if (userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.组团社)
                {
                    html = "1";
                }
                else if (userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.内部员工 ||
                         userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.导游)
                {
                    html = "2";
                }
                else if (userInfo.UserType == EyouSoft.Model.EnumType.ComStructure.UserType.供应商)
                {
                    html = "3";
                }
                else
                {
                    Response.Clear();
                    Response.Write(";" + callback + "({m:'错误的用户类型'});");
                    Response.End();
                }

                Response.Clear();
                Response.Write(";" + callback + "({h:" + html + "});");
                Response.End();
            }
            else if (isUserValid == -4)
            {
                Response.Clear();
                Response.Write(";" + callback + "({m:'用户名或密码不正确'});");
                Response.End();
            }
            else if (isUserValid == -7)
            {
                Response.Clear();
                Response.Write(";" + callback + "({m:'您的账户已停用或已过期,请联系管理员'});");
                Response.End();
            }
            else if (isUserValid == -8)
            {
                Response.Clear();
                Response.Write(";" + callback + "({m:'您的账户已登录,不能重复登录'});");
                Response.End();
            }
            else
            {
                Response.Clear();
                Response.Write(";" + callback + "({m:'登录异常,请联系管理员'});");
                Response.End();
            }
        }
Exemple #13
0
        /// <summary>
        ///  抽奖
        /// </summary>
        void getResult()
        {
            EyouSoft.Model.SSOStructure.MUserInfo m = null;
            bool isLogin = EyouSoft.Common.Page.HuiyuanPage.IsLogin(out m);

            if (!isLogin)
            {
                Utils.RCWE_AJAX("0", "未登录");
            }



            var hongbao = new Eyousoft_yhq.BLL.BHongBao().GetInfoByUserID(Utils.GetQueryStringValue("huiyuanid")); //判断是否存在红包

            if (hongbao == null)
            {
                Utils.RCWE_AJAX("0", "该用户未设置红包");
            }

            if (hongbao.UserID == m.UserID)
            {
                Utils.RCWE_AJAX("0", "不能抽取自己的红包");
            }

            //判断用户当日是否已经抽奖
            bool isExists = new Eyousoft_yhq.BLL.BChouJiang().Exists(new Eyousoft_yhq.Model.ChouJiang()
            {
                CaoZuoRenID = m.UserID, ChouJiangShiJian = DateTime.Now, FangShi = JiangLiFangShi.抽奖
            });

            if (isExists)
            {
                Utils.RCWE_AJAX("0", "每天只能抽奖一次");
            }


            Eyousoft_yhq.Model.ChouJiang info = new Eyousoft_yhq.Model.ChouJiang();
            info.ID          = hongbao.ID;
            info.CaoZuoRenID = m.UserID;
            int i = new Random().Next(1000);

            if (i > 700)
            {
                info.JieGuo  = ChouJiangJieGuo.中奖;
                info.DianShu = Utils.GetDecimal(getResultMoney(hongbao.HongBaoJinE));
            }
            else
            {
                info.JieGuo  = ChouJiangJieGuo.未中奖;
                info.DianShu = 0M;
            }
            int result = new Eyousoft_yhq.BLL.BChouJiang().Insert(info);

            if (result == 1)
            {
                if (info.JieGuo == ChouJiangJieGuo.中奖)
                {
                    Utils.RCWE_AJAX("1", "恭喜中奖", info.DianShu);
                }
                else
                {
                    Utils.RCWE_AJAX("-99", "未中奖,明天再来或分享红包领取奖励", info.DianShu);
                }
            }
            else
            {
                Utils.RCWE_AJAX("0", "操作异常");
            }
            //抽奖
            //返回结果
        }
Exemple #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary <string, string> sPara = GetRequestGet();

            if (sPara.Count > 0)//判断是否有带返回参数
            {
                Notify aliNotify    = new Notify();
                bool   verifyResult = aliNotify.VerifyReturn(sPara, Request.QueryString["sign"]);

                if (verifyResult)//验证成功
                {
                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
                    //请在这里加上商户的业务逻辑程序代码


                    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
                    //获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表

                    //商户订单号
                    string out_trade_no = Request.QueryString["out_trade_no"];

                    //支付宝交易号
                    string trade_no = Request.QueryString["trade_no"];

                    //交易状态
                    string result = Request.QueryString["result"];

                    Eyousoft_yhq.BLL.Order OrderType = new Eyousoft_yhq.BLL.Order();
                    var    OrderModel = new Eyousoft_yhq.Model.Order();
                    string res        = string.Empty;
                    if (result == "success")
                    {
                        //纪录充值消费纪录
                        try
                        {
                            string price = Request.QueryString["price"];
                            Eyousoft_yhq.BLL.BConDetaile   service = new Eyousoft_yhq.BLL.BConDetaile();
                            Eyousoft_yhq.Model.MConDetaile con     = new Eyousoft_yhq.Model.MConDetaile();
                            con.JiaoYiHao      = trade_no;
                            con.DingDanBianHao = out_trade_no;
                            con.JinE           = Decimal.Parse(price);
                            con.JiaoYiShiJian  = DateTime.Now;
                            con.XFway          = Eyousoft_yhq.Model.XFfangshi.消费;

                            EyouSoft.Model.SSOStructure.MUserInfo userInfo = Session["HuiYuanInfo"] as EyouSoft.Model.SSOStructure.MUserInfo;
                            con.HuiYuanID = userInfo.UserID;
                            service.Add(con);
                        }
                        catch (Exception)
                        {
                        }

                        OrderModel = OrderType.GetModel(out_trade_no);
                        if (OrderModel.PayState != Eyousoft_yhq.Model.PaymentState.已支付)
                        {
                            string Ra = Eyousoft_yhq.SQLServerDAL.Utils.GetRandomString(12);
                            while (OrderType.Exists(Ra))
                            {
                                Ra = Eyousoft_yhq.SQLServerDAL.Utils.GetRandomString(12);
                            }
                            Eyousoft_yhq.Model.Order OrderInfo = new Eyousoft_yhq.Model.Order()
                            {
                                OrderID     = out_trade_no,
                                PayState    = Eyousoft_yhq.Model.PaymentState.已支付,
                                ConfirmCode = Ra,
                                OrderState  = Eyousoft_yhq.Model.OrderState.已成交
                            };
                            int Sum = OrderType.UpdatePayState(OrderInfo);
                            if (Sum > 0)
                            {
                                Eyousoft_yhq.BLL.Member UM = new Eyousoft_yhq.BLL.Member();
                                bool Mo = UM.GetModel(OrderModel.MemberID).valiUser;
                                if (!Mo)
                                {
                                    #region 短信发送
                                    string code = string.Empty;
                                    IList <Eyousoft_yhq.Model.SMSChannel> channel = Eyousoft_yhq.Web.BsendMsg.CommonProcess.GetSMSChannels();
                                    //code = CreateZxingCode(Ra) + string.Format("下单成功,确认码:{0}!【惠旅游】", Ra);//生成二维码,发送彩信

                                    Eyousoft_yhq.Web.BsendMsg.CommonProcess.SendSMS(OrderModel.MemberTel, code, channel[0], out res);//发送
                                    #endregion
                                    #region  短信日志
                                    Eyousoft_yhq.Model.MsgLog MsLog = new Eyousoft_yhq.Model.MsgLog
                                    {
                                        TelCode  = OrderModel.MemberTel,
                                        MsgText  = code,
                                        ReResult = res
                                    };
                                    new Eyousoft_yhq.BLL.MsgLog().Add(MsLog);
                                    #endregion
                                }
                            }
                        }
                    }


                    Response.Redirect("/AppPage/orderlist.aspx");

                    //——请根据您的业务逻辑来编写程序(以上代码仅作参考)——

                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////
                }
                else//验证失败
                {
                    Response.Write("验证失败");
                }
            }
            else
            {
                Response.Write("无返回参数");
            }
        }
Exemple #15
0
        /// <summary>
        /// 删除供应商信息
        /// </summary>
        void DeleteGys()
        {
            string s = Utils.GetQueryStringValue("deletegysids");

            if (string.IsNullOrEmpty(s))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            string[] items = s.Split(',');
            if (items == null || items.Length == 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            EyouSoft.Model.SSOStructure.MUserInfo uinfo = null;
            bool isLogin = EyouSoft.Security.Membership.UserProvider.IsLogin(out uinfo);

            if (!isLogin)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            int privs = -9;

            var gysLeXing = new EyouSoft.BLL.GysStructure.BGys().GetGysLeiXing(items[0]);

            if (!gysLeXing.HasValue)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            switch (gysLeXing.Value)
            {
            case EyouSoft.Model.EnumType.SourceStructure.SourceType.餐馆: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_餐馆_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.车队: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_车队_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.地接社: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_地接社_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.购物: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_购物_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.景点: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_景点_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.酒店: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_酒店_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.票务: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_票务_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.其他: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_其它_删除; break;

            case EyouSoft.Model.EnumType.SourceStructure.SourceType.游轮: privs = (int)EyouSoft.Model.EnumType.PrivsStructure.Privs.资源管理_游轮_删除; break;

            default: break;
            }

            if (privs == -9)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "请求异常!"));
            }

            if (!EyouSoft.Security.Membership.UserProvider.IsGrant(uinfo.Privs, privs))
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "没有删除权限!"));
            }

            int f1 = 0;
            int f2 = 0;

            var bll = new EyouSoft.BLL.GysStructure.BGys();

            foreach (var item in items)
            {
                if (bll.Delete(uinfo.CompanyId, item) == 1)
                {
                    f1++;
                }
                else
                {
                    f2++;
                }
            }

            bll = null;

            if (f1 > 0 && f2 == 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("1", "删除成功!"));
            }
            if (f1 > 0 && f2 > 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("1", f1 + "个信息删除成功," + f2 + "个信息不允许删除。"));
            }
            if (f1 == 0 && f2 > 0)
            {
                Utils.RCWE(UtilsCommons.AjaxReturnJson("0", f2 + "个信息不允许删除。"));
            }

            Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "删除失败"));
        }
Exemple #16
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        protected void initPage()
        {
            EyouSoft.Model.SSOStructure.MUserInfo info = EyouSoft.Common.Page.HuiyuanPage.GetUserInfo();
            if (info != null)
            {
                isLogin = "******";
            }

            string id    = Utils.GetQueryStringValue("id");
            var    model = new Eyousoft_yhq.BLL.Product().GetModel(id);

            if (model != null)
            {
                yhm = model.FavourCode;
                lblproductName.Text = lblMenuTitle.Text = model.ProductName;
                lbldescript.Text    = Utils.GetText2(model.ProductDis, 100, true);
                lblprice.Text       = model.AppPrice.ToString("0");
                lblZK.Text          = ((model.AppPrice / model.MarketPrice) * 10).ToString("0.0");
                lblMarketPrice.Text = model.MarketPrice.ToString("C0");
                lblSaleCount.Text   = model.SaleNum.ToString();
                ltrDescript.Text    = model.ProductDis.Replace("\n", "<br/>");
                ltrTour.Text        = model.TourDis.Replace("\n", "<br/>");
                ltrKown.Text        = model.SendTourKnow.Replace("\n", "<br/>");
                ltrCompair.Text     = model.Scompare.Replace("\n", "<br/>");
                if (!string.IsNullOrEmpty(model.ServiceQQ))
                {
                    lblQQ.Text = string.Format("<a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?v=3&uin={0}&site=qq&menu=yes\"  ><img src=\"/images/qq.gif\"></a>", model.ServiceQQ);
                }
                else
                {
                    lblQQ.Text = "<a href=\"javascript:;\" ><img src=\"/images/qq.gif\"></a>";
                }
                if (model.AttachList != null)
                {
                    for (int i = 0; i < model.AttachList.Count; i++)
                    {
                        if (model.AttachList[i].IsWebImage)
                        {
                            lblImg.Text = string.Format("<img src=\"{0}\" style=\"width:455px;height:280px\" />", model.AttachList[i].FilePath);
                        }
                    }
                }
                else
                {
                    lblImg.Text = "<img src=\"/images/pro_mainpic.jpg\" />";
                }
                pinglunshu = new Eyousoft_yhq.BLL.Comment().GetCountNum(model.ProductID).ToString();

                if (DateTime.Compare(DateTime.Now, Utils.GetDateTime(model.ValidiDate.ToString())) > 0 && !model.IsEveryDay)
                {
                    place_Viadate.Visible   = false;
                    place_isViadate.Visible = true;
                }
                switch (model.PType)
                {
                case 2:
                    getType              = "车票";
                    lblKnow.Text         = "使用须知";
                    PlaceHolder1.Visible = PlaceHolder2.Visible = false;
                    break;

                case 3:
                    getType              = "景点门票";
                    lblKnow.Text         = "使用须知";
                    PlaceHolder1.Visible = PlaceHolder2.Visible = false;
                    break;

                default:
                    break;
                }
            }
        }