void BindRepCategoryList() { repCategoryList.DataSource = bll.GetList("ParentId=0"); repCategoryList.DataBind(); for (int i = 0; i < repCategoryList.Items.Count; i++) { HiddenField hidId = repCategoryList.Items[i].FindControl("hidId") as HiddenField; Repeater repSecondList = repCategoryList.Items[i].FindControl("repSecondList") as Repeater; repSecondList.DataSource = bll.GetList("ParentId=" + hidId.Value); repSecondList.DataBind(); } }
public static List <Model.CategoryInfo> GetList() { BLL.Category bll = new BLL.Category(); if (!enableCaching) { return(bll.GetList()); } string key = "category_all"; List <Model.CategoryInfo> data = (List <Model.CategoryInfo>)HttpRuntime.Cache[key]; if (data == null) { data = bll.GetList(); AggregateCacheDependency cd = DependencyFactory.GetProvinceCityDependency(); HttpRuntime.Cache.Add(key, data, cd, DateTime.Now.AddHours(categoryTimeout), Cache.NoSlidingExpiration, CacheItemPriority.High, null); } return(data); }
private void Bind() { GetSearchItem(); int totalCount = 0; if (bll == null) { bll = new BLL.Category(); } rpData.DataSource = bll.GetList(AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out totalCount, sqlWhere, parms == null ? null : parms.ToArray());; rpData.DataBind(); AspNetPager1.RecordCount = totalCount; }