Esempio n. 1
0
        public PartialViewResult EditSortOrderInGroup()
        {
            var taxonomyBranches = HttpRequestStorage.DatabaseEntities.TaxonomyBranches.ToList().OrderBy(x => x.GetDisplayName());
            var viewModel        = new EditSortOrderInGroupViewModel();

            return(ViewEditSortOrderInGroup(taxonomyBranches, viewModel));
        }
        public PartialViewResult EditSortOrder()
        {
            var projectCustomAttributeGroups        = HttpRequestStorage.DatabaseEntities.ProjectCustomAttributeGroups.ToList().OrderBy(x => x.GetDisplayName());
            EditSortOrderInGroupViewModel viewModel = new EditSortOrderInGroupViewModel();

            return(ViewEditSortOrder(projectCustomAttributeGroups, viewModel));
        }
Esempio n. 3
0
        public ActionResult EditSortOrderInGroup(EditSortOrderInGroupViewModel viewModel)
        {
            var taxonomyBranches = HttpRequestStorage.DatabaseEntities.TaxonomyBranches.ToList().OrderBy(x => x.GetDisplayName());

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

            viewModel.UpdateModel(new List <ISortingGroup>(taxonomyBranches));
            SetMessageForDisplay($"Successfully Updated {FieldDefinitionEnum.TaxonomyLeaf.ToType().GetFieldDefinitionLabel()} Sort Order");
            return(new ModalDialogFormJsonResult());
        }
        public ActionResult EditSortOrder(EditSortOrderInGroupViewModel viewModel)
        {
            var projectCustomAttributeGroups = HttpRequestStorage.DatabaseEntities.ProjectCustomAttributeGroups.ToList().OrderBy(x => x.GetDisplayName());


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

            viewModel.UpdateModel(new List <ISortingGroup>(projectCustomAttributeGroups));
            SetMessageForDisplay($"Successfully Updated {FieldDefinitionEnum.ProjectCustomAttribute.ToType().GetFieldDefinitionLabel()} Sort Order");
            return(new ModalDialogFormJsonResult());
        }
Esempio n. 5
0
        private PartialViewResult ViewEditSortOrderInGroup(IEnumerable <TaxonomyBranch> taxonomyBranches, EditSortOrderInGroupViewModel viewModel)
        {
            EditSortOrderInGroupViewData viewData = new EditSortOrderInGroupViewData(new List <ISortingGroup>(taxonomyBranches), FieldDefinitionEnum.TaxonomyLeaf.ToType().GetFieldDefinitionLabelPluralized());

            return(RazorPartialView <EditSortOrderInGroup, EditSortOrderInGroupViewData, EditSortOrderInGroupViewModel>(viewData, viewModel));
        }
        private PartialViewResult ViewEditSortOrder(IEnumerable <ProjectCustomAttributeGroup> projectCustomAttributeGroups, EditSortOrderInGroupViewModel viewModel)
        {
            EditSortOrderInGroupViewData viewData = new EditSortOrderInGroupViewData(new List <ISortingGroup>(projectCustomAttributeGroups), FieldDefinitionEnum.ProjectCustomAttribute.ToType().GetFieldDefinitionLabelPluralized());

            return(RazorPartialView <EditSortOrderInGroup, EditSortOrderInGroupViewData, EditSortOrderInGroupViewModel>(viewData, viewModel));
        }