public async Task <IActionResult> CreateCategory(KnowledgebaseCategoryModel model, bool continueEditing) { if (ModelState.IsValid) { var knowledgebaseCategory = await _knowledgebaseViewModelService.InsertKnowledgebaseCategoryModel(model); Success(_translationService.GetResource("Admin.Content.Knowledgebase.KnowledgebaseCategory.Added")); return(continueEditing ? RedirectToAction("EditCategory", new { knowledgebaseCategory.Id }) : RedirectToAction("List")); } //If we got this far, something failed, redisplay form return(View(model)); }
public IActionResult CreateCategory(KnowledgebaseCategoryModel model, bool continueEditing) { if (ModelState.IsValid) { var knowledgebaseCategory = _knowledgebaseViewModelService.InsertKnowledgebaseCategoryModel(model); SuccessNotification(_localizationService.GetResource("Admin.ContentManagement.Knowledgebase.KnowledgebaseCategory.Added")); return(continueEditing ? RedirectToAction("EditCategory", new { knowledgebaseCategory.Id }) : RedirectToAction("List")); } //If we got this far, something failed, redisplay form //Stores model.PrepareStoresMappingModel(null, true, _storeService); //ACL model.PrepareACLModel(null, true, _customerService); return(View(model)); }