protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { LoadTheme(themecode, siteid, languagecode, pcode); CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_ShopSearch'"); keyword = Rstring_Para("0"); sort = Rstring_Para("1"); where = "Supplier_Group_id in (select w.id from [Lebi_Supplier_Group] as w where w.type='supplier' or w.type='')"; path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("Ê×Ò³") + "\"><span>" + Tag("Ê×Ò³") + "</span></a><em class=\"home\">»</em><a class=\"text\"><span>" + Tag("µêÆÌËÑË÷") + "</span></a><em>»</em><a class=\"text\"><span>¡°" + keyword + "¡±</span></a>"; if (keyword != "") { string wherekeyword = ""; if (keyword.IndexOf(" ") > -1) { string[] keywordsArr; keywordsArr = keyword.Split(new char[1] { ' ' }); foreach (string keywords in keywordsArr) { if (keywords != "") { if (wherekeyword == "") { wherekeyword = "(Name like lbsql{'%" + keywords + "%'} or SubName like lbsql{'%" + keywords + "%'})"; } else { wherekeyword += " and (Name like lbsql{'%" + keywords + "%'} or SubName like lbsql{'%" + keywords + "%'})"; } } } } else { wherekeyword = "(Name like lbsql{'%" + keyword + "%'} or SubName like lbsql{'%" + keyword + "%'})"; } where = wherekeyword; } //SQLDataAccess.SQLPara sp = new SQLDataAccess.SQLPara(where, "id desc", "*"); shops = B_Lebi_Supplier.GetList(where, "id desc", PageSize, pageindex); recordCount = B_Lebi_Supplier.Counts(where); string url = URL("P_ShopSearch", keyword + "," + sort + ",{0}"); HeadPage = Shop.Bussiness.Pager.GetPaginationStringForWebSimple(url, pageindex, PageSize, recordCount, CurrentLanguage); FootPage = Shop.Bussiness.Pager.GetPaginationStringForWeb(url, pageindex, PageSize, recordCount, CurrentLanguage); }
/// <summary> /// 返回分组下会员数量 /// </summary> /// <param name="id"></param> /// <returns></returns> public static int UserCount(int id) { int sum = B_Lebi_Supplier.Counts("Supplier_Group_id in (select g.id from Lebi_Supplier_Group as g where g.type='supplier' and g.id = " + id + ")"); return(Convert.ToInt32(sum)); }