public PartialViewResult EditPriorityLandscapeFile(PriorityLandscapeFileResourcePrimaryKey priorityLandscapeFileResourcePrimaryKey) { var fileResource = priorityLandscapeFileResourcePrimaryKey.EntityObject; var viewModel = new EditFileResourceViewModel(fileResource); return(ViewEditPriorityLandscapeFile(viewModel)); }
public PartialViewResult EditGrantFile(GrantFileResourcePrimaryKey grantFileResourcePrimaryKey) { var fileResource = grantFileResourcePrimaryKey.EntityObject; var viewModel = new EditFileResourceViewModel(fileResource); return(ViewEditGrantFile(viewModel)); }
public PartialViewResult EditInteractionEventFile(InteractionEventFileResourcePrimaryKey interactionEventFileResourcePrimaryKey) { var fileResource = interactionEventFileResourcePrimaryKey.EntityObject; var viewModel = new EditFileResourceViewModel(fileResource); return(ViewEditInteractionFile(viewModel)); }
private PartialViewResult ViewEditGrantFile(EditFileResourceViewModel viewModel) { var viewData = new EditFileResourceViewData(); return(RazorPartialView <EditFileResource, EditFileResourceViewData, EditFileResourceViewModel>(viewData, viewModel)); }
public ActionResult EditGrantFile(GrantFileResourcePrimaryKey grantFileResourcePrimaryKey, EditFileResourceViewModel viewModel) { var fileResource = grantFileResourcePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEditGrantFile(viewModel)); } viewModel.UpdateModel(fileResource); SetMessageForDisplay($"Successfully updated file \"{fileResource.DisplayName}\"."); return(new ModalDialogFormJsonResult()); }