Exemplo n.º 1
0
        public ActionResult EditChildrenSortOrder(TaxonomyBranchPrimaryKey taxonomyBranchPrimaryKey, EditSortOrderViewModel viewModel)
        {
            var projectTypes = taxonomyBranchPrimaryKey.EntityObject.ProjectTypes;

            if (!ModelState.IsValid)
            {
                return(ViewEditChildrenSortOrder(projectTypes, viewModel));
            }

            viewModel.UpdateModel(new List <IHaveASortOrder>(projectTypes));
            SetMessageForDisplay($"Successfully Updated {FieldDefinition.TaxonomyBranch.GetFieldDefinitionLabel()} Sort Order");
            return(new ModalDialogFormJsonResult());
        }
        public ActionResult EditSortOrder(ClassificationSystemPrimaryKey classificationSystemPrimaryKey, EditSortOrderViewModel viewModel)
        {
            var classificationSystem = classificationSystemPrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewEditSortOrder(classificationSystem, viewModel));
            }

            viewModel.UpdateModel(new List <IHaveASortOrder>(classificationSystem.Classifications));
            SetMessageForDisplay("Successfully Updated Classification Sort Order");
            return(new ModalDialogFormJsonResult());
        }
Exemplo n.º 3
0
        public ActionResult EditSortOrder(EditSortOrderViewModel viewModel)
        {
            var taxonomyBranches = HttpRequestStorage.DatabaseEntities.TaxonomyBranches;

            if (!ModelState.IsValid)
            {
                return(ViewEditSortOrder(taxonomyBranches, viewModel));
            }

            viewModel.UpdateModel(new List <IHaveASortOrder>(taxonomyBranches));
            SetMessageForDisplay($"Successfully Updated {FieldDefinition.TaxonomyBranch.GetFieldDefinitionLabel()} Sort Order");
            return(new ModalDialogFormJsonResult());
        }
        public ActionResult EditAttributeTypesSortOrder(TreatmentBMPTypePrimaryKey treatmentBMPTypePrimaryKey, int attributeTypePurposeID, EditSortOrderViewModel viewModel)
        {
            var treatmentBMPType = treatmentBMPTypePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewEditAttributeTypesSortOrder(treatmentBMPType, viewModel, attributeTypePurposeID));
            }

            viewModel.UpdateModel(new List <IHaveASortOrder>(treatmentBMPType.TreatmentBMPTypeCustomAttributeTypes));
            SetMessageForDisplay("Successfully Updated Attribute Type Sort Order");
            return(new ModalDialogFormJsonResult());
        }
        public ActionResult EditObservationTypesSortOrder(TreatmentBMPTypePrimaryKey treatmentBMPTypePrimaryKey, EditSortOrderViewModel viewModel)
        {
            var treatmentBMPType = treatmentBMPTypePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewEditObservationTypesSortOrder(treatmentBMPType, viewModel));
            }

            viewModel.UpdateModel(new List <IHaveASortOrder>(treatmentBMPType.TreatmentBMPTypeAssessmentObservationTypes));
            SetMessageForDisplay("Successfully Updated Observation Type Sort Order");
            return(new ModalDialogFormJsonResult());
        }
Exemplo n.º 6
0
        public ActionResult EditDocumentSortOrder(DocumentLibraryPrimaryKey documentLibraryPrimaryKey, EditSortOrderViewModel viewModel)
        {
            var documentLibrary = documentLibraryPrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewEditDocumentSortOrder(documentLibrary, viewModel));
            }

            viewModel.UpdateModel(new List <IHaveASortOrder>(documentLibrary.DocumentLibraryDocuments));
            SetMessageForDisplay("Successfully Updated Document Sort Order");
            return(new ModalDialogFormJsonResult());
        }
Exemplo n.º 7
0
        public ActionResult EditSortOrder(EditSortOrderViewModel viewModel)
        {
            var projectCustomAttributeGroups = HttpRequestStorage.DatabaseEntities.ProjectCustomAttributeGroups;


            if (!ModelState.IsValid)
            {
                return(ViewEditSortOrder(projectCustomAttributeGroups, viewModel));
            }

            viewModel.UpdateModel(new List <IHaveASortOrder>(projectCustomAttributeGroups));
            SetMessageForDisplay($"Successfully Updated {FieldDefinitionEnum.ProjectCustomAttributeGroup.ToType().GetFieldDefinitionLabel()} Sort Order");
            return(new ModalDialogFormJsonResult());
        }