Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("brand_list", "品牌列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize     = RequestTool.getpageSize(25);
            lang         = RequestTool.RequestString("lang");
            key          = RequestTool.RequestString("key");
            type         = RequestTool.RequestString("type");
            status       = RequestTool.RequestInt("status", 0);
            string where = "1=1";
            if (status > 0)
            {
                where += " and Type_id_BrandStatus = " + status + "";
            }
            if (key != "")
            {
                where += " and Name like lbsql{'%" + key + "%'}";
            }
            if (type != "")
            {
                where += " and Pro_Type_id like lbsql{'%" + type + "%'}";
            }
            models = B_Lebi_Brand.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_Brand.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&type=" + type + "&status=" + status + "&key=" + key, page, PageSize, recordCount);
        }
Exemple #2
0
        /// <summary>
        /// 品牌页面
        /// </summary>
        /// <param name="lang"></param>
        /// <param name="model"></param>
        /// <param name="theme"></param>
        /// <param name="urlpath"></param>
        private void P_Brand(Lebi_Language lang, Lebi_Theme_Page page, Lebi_Theme theme, string urlpath)
        {
            string            url;
            string            path   = lang.Path + "/" + page.StaticPath + "/" + page.StaticPageName;
            string            file   = "";
            List <Lebi_Brand> models = B_Lebi_Brand.GetList("", "");

            foreach (Lebi_Brand model in models)
            {
                url  = page.PageName + "?" + page.PageParameter;
                url  = url.Replace("{0}", model.id.ToString());
                url  = urlpath + "/" + url;
                file = path.Replace("{0}", model.id.ToString());
                file = RegexTool.ReplaceRegValue(file, @"{.*?}", "");
                url  = RegexTool.ReplaceRegValue(url, @"{.*?}", "");
                url  = ThemeUrl.CheckURL(url);
                HtmlEngine.Instance.CreatHtml(url, file);
            }
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_brand", "商品品牌"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            PageSize     = RequestTool.getpageSize(25);
            lang         = RequestTool.RequestString("lang");
            key          = RequestTool.RequestString("key");
            type         = RequestTool.RequestString("type");
            string where = "Supplier_id = " + CurrentSupplier.id;
            if (key != "")
            {
                where += " and Name like lbsql{'%" + key + "%'}";
            }
            if (type != "")
            {
                where += " and Pro_Type_id like lbsql{'%" + type + "%'}";
            }
            models = B_Lebi_Brand.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_Brand.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}&type=" + type + "&key=" + key, page, PageSize, recordCount);
        }