public ActionResult ProductEdit() { int id = CECRequest.GetQueryInt("id", 0); var companyInfo = MemberService.GetCompanyInfoByUserId(PlantEngContext.Current.UserId); var model = CompanyProductService.Get(id, companyInfo.CompanyId); //产品分类 ViewBag.CategoryList = CompanyProductCategoryService.GetCategoryList(companyInfo.CompanyId); return(View(model)); }
public ActionResult Detail() { int productId = CECRequest.GetQueryInt("id", 0); //根据产品ID获得公司信息 var productInfo = CompanyProductService.Get(productId); if (productInfo.Id == 0) { return(Redirect("/")); } //模板所用公司信息 var companyInfo = MemberService.GetCompanyInfo(productInfo.CompanyId); ViewBag.CompanyInfo = companyInfo; return(View("ProductDetail", productInfo)); }