public void Page_Load(object sender, EventArgs args) { var pageIndex = Request["pg"].TryToInt(); if (pageIndex < 0) { pageIndex = 0; } cur_page = pageIndex + 1; var frontDp = CaseBll.SearchCasesForFront(Request["building_kw"], Request["rs"], Request["dst"], Request["ht"], 20, pageIndex); cases = frontDp.Table.Populate <Case>(); pages = frontDp.Page.pageCount; count = frontDp.Page.rowCount; site = SiteBll.GetSessionSite(); htypes = DictBll.GetHouseTypes(); styles = DictBll.GetRoomStyles(); types = DictBll.GetDecorationStyles(); tdks = SeoBll.GetTDKbyPage("search.aspx", "").Table.Populate <SeoBll.Seo>(); contractorsList4global = ContractorBll.GetAllContractors(0, 500).Table.Populate <Contractor> (); }
/// <summary> /// 获取所有的字典信息的方法 /// </summary> /// <returns></returns> private Dictionary <string, object> GetDataItemList() { var dicts = new DictBll().GetAllDict(); var dictItems = new DictItemBll().GetAllDictItem(); Dictionary <string, object> dictionaryList = new Dictionary <string, object>(); foreach (DictModel item in dicts) { var dataItemList = dictItems.FindAll(t => t.F_DictId.Equals(item.F_Id)); Dictionary <string, string> dictionaryItemList = new Dictionary <string, string>(); foreach (var itemList in dataItemList) { dictionaryItemList.Add(itemList.F_Code, itemList.F_Name); } if (!dictionaryList.ContainsKey(item.F_Code)) { dictionaryList.Add(item.F_Code, dictionaryItemList); } } return(dictionaryList); }