public ActionResult DeleteTag(TagItemViewModel tag) { bool success = GetCommand<DeleteTagCommand>().ExecuteCommand( new DeleteTagCommandRequest { TagId = tag.Id, Version = tag.Version }); if (success) { Messages.AddSuccess(RootGlobalization.DeleteTag_DeletedSuccessfully_Message); } return Json(new WireJson(success)); }
public ActionResult SaveTag(TagItemViewModel tag) { if (ModelState.IsValid) { var response = GetCommand<SaveTagCommand>().ExecuteCommand(tag); if (response != null) { if (tag.Id.HasDefaultValue()) { Messages.AddSuccess(RootGlobalization.CreateTag_CreatedSuccessfully_Message); } return Json(new WireJson { Success = true, Data = response }); } } return Json(new WireJson { Success = false }); }