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

            return(ViewEditPriorityLandscapeFile(viewModel));
        }
        public ActionResult EditPriorityLandscapeFile(PriorityLandscapeFileResourcePrimaryKey priorityLandscapeFileResourcePrimaryKey, EditFileResourceViewModel viewModel)
        {
            var fileResource = priorityLandscapeFileResourcePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewEditPriorityLandscapeFile(viewModel));
            }

            viewModel.UpdateModel(fileResource);
            SetMessageForDisplay($"Successfully updated file \"{fileResource.DisplayName}\".");
            return(new ModalDialogFormJsonResult());
        }
        public ActionResult DeletePriorityLandscapeFile(PriorityLandscapeFileResourcePrimaryKey priorityLandscapeFileResourcePrimaryKey, ConfirmDialogFormViewModel viewModel)
        {
            var priorityLandscapeFileResource = priorityLandscapeFileResourcePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewDeletePriorityLandscapeFile(priorityLandscapeFileResource, viewModel));
            }

            var message = $"{FieldDefinition.PriorityLandscape.GetFieldDefinitionLabel()} file \"{priorityLandscapeFileResource.DisplayName}\" created on '{priorityLandscapeFileResource.FileResource.CreateDate}' by '{priorityLandscapeFileResource.FileResource.CreatePerson.FullNameFirstLast}' successfully deleted.";

            priorityLandscapeFileResource.DeleteFullAndChildless(HttpRequestStorage.DatabaseEntities);
            SetMessageForDisplay(message);
            return(new ModalDialogFormJsonResult());
        }
        public PartialViewResult DeletePriorityLandscapeFile(PriorityLandscapeFileResourcePrimaryKey priorityLandscapeFileResourcePrimaryKey)
        {
            var viewModel = new ConfirmDialogFormViewModel(priorityLandscapeFileResourcePrimaryKey.PrimaryKeyValue);

            return(ViewDeletePriorityLandscapeFile(priorityLandscapeFileResourcePrimaryKey.EntityObject, viewModel));
        }