public PartialViewResult EditPriorityLandscapeFile(PriorityLandscapeFileResourcePrimaryKey priorityLandscapeFileResourcePrimaryKey)
        {
            var fileResource = priorityLandscapeFileResourcePrimaryKey.EntityObject;
            var viewModel    = new EditFileResourceViewModel(fileResource);

            return(ViewEditPriorityLandscapeFile(viewModel));
        }
Example #2
0
        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));
        }
Example #4
0
        private PartialViewResult ViewEditGrantFile(EditFileResourceViewModel viewModel)
        {
            var viewData = new EditFileResourceViewData();

            return(RazorPartialView <EditFileResource, EditFileResourceViewData, EditFileResourceViewModel>(viewData, viewModel));
        }
Example #5
0
        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());
        }