Exemple #1
0
        /// <summary>
        /// init gundongtupin
        /// </summary>
        void InitGunDongTuPian()
        {
            int recordCount = 0;
            var chaXun      = new EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo();
            //chaXun.WeiZhi = EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.礼品卡首页轮换图片;
            var items = new EyouSoft.BLL.YlStructure.BWz().GetGuangGaos(YuMingInfo.CompanyId, 5, 1, ref recordCount, chaXun);

            StringBuilder s1 = new StringBuilder();
            StringBuilder s2 = new StringBuilder();

            if (items != null && items.Count > 0)
            {
                foreach (var item in items)
                {
                    string url    = item.Url;
                    string target = "target=\"_blank\"";

                    if (string.IsNullOrEmpty(url))
                    {
                        url    = "javascript:void(0)";
                        target = string.Empty;
                    }

                    s1.AppendFormat("<li><a href=\"{0}\" {1}><img src=\"{2}\" /></a></li>", url, target, ErpFilepath + item.Filepath);

                    s2.AppendFormat("<li><a href=\"javascript:void(0)\"></a></li>");
                }
            }

            ltr1.Text = s1.ToString();
            ltr2.Text = s2.ToString();
        }
Exemple #2
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", "请填写密码!");
         *  }
         *
         *  MYlHuiYuanInfo userInfo = null;
         *  EyouSoft.Model.ComStructure.MPasswordInfo pwdInfo = new MPasswordInfo();
         *  pwdInfo.NoEncryptPassword = pw;
         *
         *  int isUserValid = -8;
         *  if (YuMingInfo != null)
         *  {
         *     isUserValid=EyouSoft.Security.Membership.YlHuiYuanProvider.Login(YuMingInfo.CompanyId, un, pwdInfo, out userInfo);
         *  }
         *
         *  if (isUserValid == 1)
         *  {
         *      return UtilsCommons.AjaxReturnJson("1", "登录成功,正在跳转,请稍后……");
         *  }
         *  else if (isUserValid == 0)
         *  {
         *      return UtilsCommons.AjaxReturnJson("0", "用户名或密码错误!");
         *  }
         *  else if (isUserValid == -1)
         *  {
         *      return UtilsCommons.AjaxReturnJson("-1", "用户名不能为空!");
         *  }
         *  else if (isUserValid == -2)
         *  {
         *      return UtilsCommons.AjaxReturnJson("-2", "密码不能为空!");
         *  }
         *  else if (isUserValid == -3)
         *  {
         *      return UtilsCommons.AjaxReturnJson("-3", "您的账户不存在,请联系管理员!");
         *  }
         *  else if (isUserValid == -4)
         *  {
         *      return UtilsCommons.AjaxReturnJson("-4", "您的账户不可用,请联系管理员!");
         *  }
         *  else
         *  {
         *      return UtilsCommons.AjaxReturnJson("-8", "登录错误,请联系管理员!");
         *  }
         * }
         */

        void InitGuangGao()
        {
            int recordCount = 0;
            var chaXun      = new EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo();
            var b           = new EyouSoft.BLL.YlStructure.BWz();

            chaXun.WeiZhi = EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.登录页左侧大图;

            var items = b.GetGuangGaos(YuMingInfo.CompanyId, 1, 1, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                ltrGuangGao.Text = string.Format("<img  src=\"{0}\">", EyouSoft.YlWeb.TuPian.F1(ErpFilepath + items[0].Filepath, 743, 495));
            }
            else
            {
                ltrGuangGao.Text = string.Format("<img  src=\"\">");
            }

            chaXun.WeiZhi = EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.登录页右下图片;
            items         = b.GetGuangGaos(YuMingInfo.CompanyId, 1, 1, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                this.Literal1.Text = string.Format("<img src=\"{0}\">", EyouSoft.YlWeb.TuPian.F1(ErpFilepath + items[0].Filepath, 341, 110));
            }
            else
            {
                this.Literal1.Text = string.Format("<img  src=\"\">");
            }
        }
Exemple #3
0
        /// <summary>
        /// get chaxun info
        /// </summary>
        /// <returns></returns>
        EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo GetChaXunInfo()
        {
            var info = new EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo();

            info.WeiZhi = (EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi?)Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi), Utils.GetQueryStringValue("txtWeiZhi"));

            return(info);
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var YuMingInfo  = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();
            int recordCount = 0;
            var chaXun      = new EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo();

            chaXun.WeiZhi = WeiZhi;
            var items = new EyouSoft.BLL.YlStructure.BWz().GetGuangGaos(YuMingInfo.CompanyId, 8, 1, ref recordCount, chaXun);

            StringBuilder s1 = new StringBuilder();
            StringBuilder s2 = new StringBuilder();

            if (items != null && items.Count > 0)
            {
                int j = 0;
                foreach (var item in items)
                {
                    string url    = item.Url;
                    string target = "target=\"_blank\"";
                    string style  = "";

                    if (j++ == 0)
                    {
                        style = " style=\"display:block;\" ";
                    }

                    if (string.IsNullOrEmpty(url))
                    {
                        url    = "javascript:void(0)";
                        target = string.Empty;
                    }

                    s1.AppendFormat("<li class=\"bg_img\" data-src='{0}' {1}>", item.Url, style);
                    s1.AppendFormat("<div class=\"banner_con\" style=\"background-image: url({0});\" time=\"5000\">", Utils.GetErpFilepath() + item.Filepath);
                    //if (!string.IsNullOrEmpty(item.Url))
                    //{
                    //    s1.AppendFormat("<a href='{0}' target='_blank' style='display:block;width:100%;height:100%;position:relative;z-index:100'></a>", item.Url);
                    //}
                    s1.Append("</div>");
                    s1.Append("</li>");
                }

                for (int i = 0; i < items.Count; i++)
                {
                    string _class = "play_but_disc";
                    if (i == 0)
                    {
                        _class = "play_but_disc current";
                    }
                    s2.AppendFormat("<span class=\"{1}\" rel=\"{0}\"></span>", i + 1, _class);
                }
            }

            ltr1.Text = s1.ToString();
            ltr2.Text = s2.ToString();
        }
Exemple #5
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        void InitData()
        {
            //首页轮播图片
            var chaXun = new EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo()
            {
                WeiZhi = EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.首页轮播图片
            };
            var items = new EyouSoft.BLL.YlStructure.BWz().GetGuangGaos(this.YuMingInfo.CompanyId, 14, 1, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                this.rptGuangGao.DataSource = items; this.rptGuangGao.DataBind();
            }
        }
Exemple #6
0
        void InitGuangGao()
        {
            int recordCount = 0;
            var chaXun      = new EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo();

            chaXun.WeiZhi = EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.重置登录密码页右侧大图;

            var items = new EyouSoft.BLL.YlStructure.BWz().GetGuangGaos(YuMingInfo.CompanyId, 1, 1, ref recordCount, chaXun);

            if (items != null && items.Count > 0)
            {
                ltrGuangGao.Text = string.Format("<img src=\"{0}\">", EyouSoft.YlWeb.TuPian.F1("http://" + YuMingInfo.ErpYuMing + items[0].Filepath, 635, 372));
            }
            else
            {
                ltrGuangGao.Text = string.Format("<img  src=\"\">");
            }
        }
Exemple #7
0
        private void InitPage()
        {
            MYlHuiYuanInfo userInfo = null;

            if (YlHuiYuanProvider.IsLogin(out userInfo))
            {
                if (userInfo != null)
                {
                    ltrUserName.Text = userInfo.Username;
                }
                plnLogin.Visible    = false;
                plnRegister.Visible = false;
                plnOrder.Visible    = true;
                plnLoginOut.Visible = true;
            }

            var yuMingInfo = EyouSoft.Security.Membership.YlHuiYuanProvider.GetYuMingInfo();

            int recordCount = 0;
            var chaXun      = new EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo();

            chaXun.WeiZhi = EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.热门关键字;
            var items = new EyouSoft.BLL.YlStructure.BWz().GetGuangGaos(yuMingInfo.CompanyId, 8, 1, ref recordCount, chaXun);

            StringBuilder s = new StringBuilder();

            if (items != null && items.Count > 0)
            {
                foreach (var item in items)
                {
                    if (!string.IsNullOrEmpty(item.Url))
                    {
                        s.AppendFormat("<a href=\"{1}\" target=\"_blank\">{0}</a>", item.MingCheng, item.Url);
                    }
                    else
                    {
                        s.AppendFormat("<a href=\"javascript:void(0)\" class=\"i_rmgjz\">{0}</a>", item.MingCheng);
                    }
                }
            }
            ltrReMen.Text = s.ToString();
        }
Exemple #8
0
        /// <summary>
        /// 获取广告信息集合
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="pageSize">页记录数</param>
        /// <param name="pageIndex">页序号</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="chaXun">查询</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.YlStructure.MWzGuangGaoInfo> GetGuangGaos(string companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.YlStructure.MWzGuangGaoChaXunInfo chaXun)
        {
            if (string.IsNullOrEmpty(companyId))
            {
                return(null);
            }

            return(dal.GetGuangGaos(companyId, pageSize, pageIndex, ref recordCount, chaXun));
        }