/// <summary> /// 品牌列表 /// </summary> /// <param name="brandName">品牌名称</param> /// <param name="sortColumn">排序列</param> /// <param name="sortDirection">排序方向</param> /// <param name="pageSize">每页数</param> /// <param name="pageNumber">当前页数</param> /// <returns></returns> public ActionResult List(string brandName, string sortColumn, string sortDirection, int pageSize = 15, int pageNumber = 1) { string condition = AdminBrands.AdminGetBrandListCondition(brandName); string sort = AdminBrands.AdminGetBrandListSort(sortColumn, sortDirection); PageModel pageModel = new PageModel(pageSize, pageNumber, AdminBrands.AdminGetBrandCount(condition)); BrandListModel model = new BrandListModel() { BrandList = AdminBrands.AdminGetBrandList(pageModel.PageSize, pageModel.PageNumber, condition, sort), PageModel = pageModel, SortColumn = sortColumn, SortDirection = sortDirection, BrandName = brandName }; ShopUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&sortColumn={3}&sortDirection={4}&brandName={5}", Url.Action("list"), pageModel.PageNumber, pageModel.PageSize, sortColumn, sortDirection, brandName)); return(View(model)); }
/// <summary> /// 属性列表 /// </summary> public ActionResult AttributeList(string sortColumn, string sortDirection, int cateId = -1) { CategoryInfo categoryInfo = AdminCategories.GetCategoryById(cateId); if (categoryInfo == null) { return(PromptView("分类不存在")); } string sort = AdminBrands.AdminGetBrandListSort(sortColumn, sortDirection); AttributeListModel model = new AttributeListModel() { AttributeList = AdminCategories.AdminGetAttributeList(cateId, sort), SortColumn = sortColumn, SortDirection = sortDirection, CateId = cateId, CategoryName = categoryInfo.Name }; MallUtils.SetAdminRefererCookie(string.Format("{0}?cateId={1}&sortColumn={2}&sortDirection={3}", Url.Action("attributelist"), cateId, sortColumn, sortDirection)); return(View(model)); }