// GET: /Brand/ public ActionResult BrandList() { try { SupplierBrandBLL supplierBLL = new SupplierBrandBLL(); var page = new PageDTO() { PageIndex = PageNo, PageSize = DefaultPageSize }; var result = supplierBLL.GetBrandBySupplierId(CurrentUser.SupplierID, page); return(View(result)); } catch (Exception ex) { LogHelper.Error(ex); } return(View()); }
/// <summary> /// 已发布的商品 编辑 /// </summary> /// <param name="categoryId"></param> /// <param name="spu"></param> /// <returns></returns> public ActionResult ProductEdit(int categoryId, string spu) { var categoryModel = CategoryBLL.GetCategoriesInfoByID(LanguageEnum.SimplifiedChinese, categoryId); if (categoryModel == null) { return(View()); } var categoryAttr = bll.GetCategoryAttrs(categoryId); SupplierBrandBLL brand = new SupplierBrandBLL(); ViewBag.SupplierBrand = brand.GetBrandBySupplierId(CurrentUser.SupplierID, LanguageEnum.SimplifiedChinese); ViewBag.CategoryId = categoryId; ViewBag.CategoryModel = categoryModel; ViewBag.Action = "edit"; ProductUpdateBindingModel pmodel = new ProductUpdateBindingModel(); // 根据spuID 获取相关信息 if (!string.IsNullOrEmpty(spu)) { pmodel = bll.ReadProductInfo(spu, CurrentUser.SupplierID, 1, true); if (pmodel == null || pmodel.ProductInfo_S == null) { return(new TransferResult("/Error/PageNotFound")); } else { ViewBag.ProductModel = pmodel; } } return(View("ProductUpload", categoryAttr)); }