public async Task <ActionResult> New(string tabId, int parentId) { var plugin = _pluginService.New(parentId); var model = QpPluginViewModel.Create(plugin, tabId, parentId, _factory); return(await JsonHtml("Properties", model)); }
public async Task <ActionResult> Properties(string tabId, int parentId, int id, string successfulActionCode) { var plugin = _pluginService.Read(id); var model = QpPluginViewModel.Create(plugin, tabId, parentId, _factory); model.SuccesfulActionCode = successfulActionCode; return(await JsonHtml("Properties", model)); }
public async Task <ActionResult> Properties(string tabId, int parentId, int id, IFormCollection collection) { var plugin = _pluginService.ReadForUpdate(id); var model = QpPluginViewModel.Create(plugin, tabId, parentId, _factory); await TryUpdateModelAsync(model); if (ModelState.IsValid) { model.Data = _pluginService.Update(model.Data); PersistResultId(model.Data.Id); return(Redirect("Properties", new { tabId, parentId, id = model.Data.Id, successfulActionCode = ActionCode.UpdateQpPlugin })); } return(await JsonHtml("Properties", model)); }