Exemplo n.º 1
0
        public PartialViewResult DeleteRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey)
        {
            var relationshipType = relationshipTypePrimaryKey.EntityObject;
            var viewModel        = new ConfirmDialogFormViewModel(relationshipType.RelationshipTypeID);

            return(ViewDeleteRelationshipType(relationshipType, viewModel));
        }
Exemplo n.º 2
0
        public PartialViewResult EditRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey)
        {
            var relationshipType = relationshipTypePrimaryKey.EntityObject;
            var viewModel        = new EditRelationshipTypeViewModel(relationshipType);

            return(ViewEditRelationshipType(viewModel));
        }
Exemplo n.º 3
0
        public ActionResult DeleteRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey, ConfirmDialogFormViewModel viewModel)
        {
            var relationshipType = relationshipTypePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewDeleteRelationshipType(relationshipType, viewModel));
            }

            relationshipType.DeleteFull(HttpRequestStorage.DatabaseEntities);
            return(new ModalDialogFormJsonResult());
        }
Exemplo n.º 4
0
        public ActionResult EditRelationshipType(RelationshipTypePrimaryKey relationshipTypePrimaryKey, EditRelationshipTypeViewModel viewModel)
        {
            var relationshipType = relationshipTypePrimaryKey.EntityObject;

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

            HttpRequestStorage.DatabaseEntities.OrganizationTypeRelationshipTypes.Load();
            var organizationTypeRelationshipTypes = HttpRequestStorage.DatabaseEntities.OrganizationTypeRelationshipTypes.Local;

            viewModel.UpdateModel(relationshipType, organizationTypeRelationshipTypes);
            return(new ModalDialogFormJsonResult());
        }