public PartialViewResult Edit(CustomPagePrimaryKey customPagePrimaryKey) { var customPage = customPagePrimaryKey.EntityObject; var viewModel = new EditViewModel(customPage); return(ViewEdit(viewModel)); }
public PartialViewResult DeleteCustomPage(CustomPagePrimaryKey customPagePrimaryKey) { var customPage = customPagePrimaryKey.EntityObject; var viewModel = new ConfirmDialogFormViewModel(customPage.CustomPageID); return(ViewDeleteCustomPage(customPage, viewModel)); }
public PartialViewResult EditInDialog(CustomPagePrimaryKey customPagePrimaryKey) { var customPage = customPagePrimaryKey.EntityObject; var viewModel = new EditHtmlContentInDialogViewModel(customPage); return(ViewEditInDialog(viewModel, customPage)); }
public ContentResult CkEditorUploadFileResourceForCustomPage(CustomPagePrimaryKey customPagePrimaryKey, CkEditorImageUploadViewModel viewModel) { var fileResourceInfo = FileResourceModelExtensions.CreateNewFromHttpPostedFileAndSave(viewModel.upload, CurrentFirmaSession); var customPage = customPagePrimaryKey.EntityObject; var ppImage = new CustomPageImage(customPage, fileResourceInfo); HttpRequestStorage.DatabaseEntities.AllCustomPageImages.Add(ppImage); return(Content(viewModel.GetCkEditorJavascriptContentToReturn(fileResourceInfo))); }
public ActionResult EditInDialog(CustomPagePrimaryKey customPagePrimaryKey, EditHtmlContentInDialogViewModel viewModel) { var customPage = customPagePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEditInDialog(viewModel, customPage)); } viewModel.UpdateModel(customPage, HttpRequestStorage.DatabaseEntities); return(new ModalDialogFormJsonResult()); }
public ActionResult Edit(CustomPagePrimaryKey customPagePrimaryKey, EditViewModel viewModel) { var customPage = customPagePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEdit(viewModel)); } viewModel.UpdateModel(customPage, CurrentPerson); return(new ModalDialogFormJsonResult()); }
public ActionResult DeleteCustomPage(CustomPagePrimaryKey customPagePrimaryKey, ConfirmDialogFormViewModel viewModel) { var customPage = customPagePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewDeleteCustomPage(customPage, viewModel)); } SetMessageForDisplay($"Custom Page '{customPage.CustomPageDisplayName}' successfully removed."); customPage.DeleteFull(HttpRequestStorage.DatabaseEntities); return(new ModalDialogFormJsonResult()); }
public PartialViewResult CustomPageDetails(CustomPagePrimaryKey customPagePrimaryKey) { var customPage = customPagePrimaryKey.EntityObject; var customPageContentHtmlString = customPage.CustomPageContentHtmlString; if (!customPage.HasPageContent()) { customPageContentHtmlString = new HtmlString(string.Format("No page content for Page \"{0}\".", customPage.CustomPageDisplayName)); } var viewData = new CustomPageDetailsViewData(customPageContentHtmlString); return(RazorPartialView <CustomPageDetails, CustomPageDetailsViewData>(viewData)); }
public ActionResult Edit(CustomPagePrimaryKey customPagePrimaryKey, EditViewModel viewModel) { var customPage = customPagePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEdit(viewModel)); } HttpRequestStorage.DatabaseEntities.CustomPageRoles.Load(); var customPageRoles = HttpRequestStorage.DatabaseEntities.AllCustomPageRoles.Local; viewModel.UpdateModel(customPage, CurrentFirmaSession, customPageRoles); return(new ModalDialogFormJsonResult()); }
public ContentResult CkEditorUploadFileResourceForCustomPage(CustomPagePrimaryKey customPagePrimaryKey) { return(Content(String.Empty)); }