Beispiel #1
0
        public ActionResult EditPropductCategoryArticle(int categoryId)
        {
            ProductCategory productCategory           = _productCategoriesBL.GetById(categoryId);
            ProductCategoryArticleEditViewModel model = new ProductCategoryArticleEditViewModel
            {
                Id   = productCategory.Id,
                Text = productCategory.Article
            };

            return(View(model));
        }
Beispiel #2
0
        public ActionResult Save(ProductCategoryArticleEditViewModel model)
        {
            ProductCategory productCategory = _productCategoriesBL.GetById(model.Id.Value);

            productCategory.Article = model.Text;
            _productCategoriesBL.Update(productCategory);

            return(RedirectToAction("Index", new
            {
                parentCategoryId = model.Id.Value
            }));
        }