public PartialViewResult DeleteOrganizationRelationshipType(OrganizationRelationshipTypePrimaryKey organizationRelationshipTypePrimaryKey)
        {
            var organizationRelationshipType = organizationRelationshipTypePrimaryKey.EntityObject;
            var viewModel = new ConfirmDialogFormViewModel(organizationRelationshipType.OrganizationRelationshipTypeID);

            return(ViewDeleteRelationshipType(organizationRelationshipType, viewModel));
        }
        public PartialViewResult EditOrganizationRelationshipType(OrganizationRelationshipTypePrimaryKey organizationRelationshipTypePrimaryKey)
        {
            var organizationRelationshipType = organizationRelationshipTypePrimaryKey.EntityObject;
            var viewModel = new EditOrganizationRelationshipTypeViewModel(organizationRelationshipType);

            return(ViewEditOrganizationRelationshipType(viewModel));
        }
        public ActionResult DeleteOrganizationRelationshipType(OrganizationRelationshipTypePrimaryKey organizationRelationshipTypePrimaryKey, ConfirmDialogFormViewModel viewModel)
        {
            var organizationRelationshipType = organizationRelationshipTypePrimaryKey.EntityObject;

            if (!ModelState.IsValid)
            {
                return(ViewDeleteRelationshipType(organizationRelationshipType, viewModel));
            }
            organizationRelationshipType.DeleteFull(HttpRequestStorage.DatabaseEntities);
            return(new ModalDialogFormJsonResult());
        }
        public ActionResult EditOrganizationRelationshipType(OrganizationRelationshipTypePrimaryKey organizationRelationshipTypePrimaryKey, EditOrganizationRelationshipTypeViewModel viewModel)
        {
            var relationshipType = organizationRelationshipTypePrimaryKey.EntityObject;

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

            HttpRequestStorage.DatabaseEntities.OrganizationTypeOrganizationRelationshipTypes.Load();
            var organizationTypeRelationshipTypes = HttpRequestStorage.DatabaseEntities.AllOrganizationTypeOrganizationRelationshipTypes.Local;

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