public ActionResult UpdateCategory(YandexMarketCategoryModel model, GridCommand command) { var category = _yandexMarketCategoryService.GetById(model.Id); category.Name = model.Name; _yandexMarketCategoryService.Update(category); return(ListCategory(command)); }
private void UpdateCategory(YandexMarketCategoryModel model) { var category = _yandexMarketCategoryService.GetById(model.Id); category.Name = model.Name; category.Url = model.Url; category.IsActive = model.IsActive; _yandexMarketCategoryService.Update(category); }
public ActionResult Configure(YandexMarketParserModel model) { if (!ModelState.IsValid) { return(Configure()); } if (model.IsTest) { model.ProductList = CreateTestProductList(model.CategoryId); _yandexMarketProductService.InsertList(model.ProductList); } else { var categoryName = _yandexMarketCategoryService.GetById(model.CategoryId).Name; var parser = new Parser(categoryName, model.ParseNotMoreThen); model.ProductList = parser.Parse(); } return(View("Nop.Plugin.Misc.YandexMarketParser.Views.YandexMarketParser.Configure", model)); }