public ActionResult AddPageContent(PageContentViewModel model) { if (GetCommand<SaveContentCommand>().ExecuteCommand(model)) { return Json(new WireJson { Success = true }); } return Json(new WireJson { Success = false }); }
public ActionResult AddPageContent(string pageId, string regionId) { var viewModel = new PageContentViewModel { PageId = Guid.Parse(pageId), RegionId = Guid.Parse(regionId), LiveFrom = DateTime.Today }; var request = new GetWidgetCategoryRequest(); viewModel.WidgetCategories = GetCommand<GetWidgetCategoryCommand>().ExecuteCommand(request).WidgetCategories; return View(viewModel); }
public ActionResult SavePageHtmlContent(PageContentViewModel model) { try { var result = GetCommand<SavePageHtmlContentCommand>().ExecuteCommand(model); if (result != null) { return Json( new WireJson { Success = true, Data = new { PageContentId = result.PageContentId, ContentId = result.ContentId, RegionId = result.RegionId, PageId = result.PageId, DesirableStatus = model.DesirableStatus } }); } return Json(new WireJson { Success = false }); } catch (ConfirmationRequestException exc) { return Json(new WireJson { Success = false, Data = new { ConfirmationMessage = exc.Resource() } }); } }
public ActionResult SavePageHtmlContent(PageContentViewModel model) { var result = GetCommand<SavePageHtmlContentCommand>().ExecuteCommand(model); if (result != null) { return Json( new WireJson { Success = true, Data = new { PageContentId = result.PageContentId, ContentId = result.ContentId, RegionId = result.RegionId, PageId = result.PageId, DesirableStatus = model.DesirableStatus } }); } return Json(new WireJson { Success = false }); }