public ActionResult EditProductStyle(ProductStyleViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                foreach (var error in ModelState.Values.SelectMany(m => m.Errors).Select(e => e.ErrorMessage))
                {
                    _orchardServices.Notifier.Error(T(error));
                }
                return RedirectToAction("EditProductStyle", new {productStyleId = viewModel.Id});
            }

            var productStyle = _productStyleRepository.Get(viewModel.Id);
            productStyle.Name = viewModel.Name;
            _productStyleRepository.Update(productStyle);

            _orchardServices.Notifier.Information(T("Product Style has been edited."));
            return RedirectToAction("Index");
        }
        public ActionResult AddProductStyle(string returnUrl)
        {
            var viewModel = new ProductStyleViewModel {ReturnUrl = returnUrl};

            return View(viewModel);
        }
        public ActionResult EditProductStyle(int productStyleId)
        {
            var productStyle = _productStyleRepository.Get(productStyleId);

            var viewModel = new ProductStyleViewModel
            {
                Id = productStyle.Id,
                Name = productStyle.Name
            };

            return View(viewModel);
        }