示例#1
0
        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));
        }
示例#2
0
        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));
        }