示例#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);
        }
示例#2
0
        public static int BrandCount(string fist, string keyword)
        {
            string where = "Type_id_BrandStatus = 452 and FirstLetter=lbsql{'" + fist + "'}";
            if (keyword != "")
            {
                where += " and Name like lbsql{'%" + keyword + "%'}";
            }
            int count = B_Lebi_Brand.Counts(where);

            return(count);
        }
示例#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);
        }