Ejemplo n.º 1
0
        public override void update()
        {
            CswNbtNode CisproRequestFulfillerRole = _CswNbtSchemaModTrnsctn.Nodes.makeRoleNodeFromRoleName( "CISPro_Request_Fulfiller" );
            if( null != CisproRequestFulfillerRole )
            {
                LandingPageData PageData = _CswNbtSchemaModTrnsctn.getLandingPageTable().getLandingPageItems( new LandingPageData.Request
                    {
                        RoleId = CisproRequestFulfillerRole.NodeId.ToString(),
                        ActionId = null
                    } );

                Collection<Int32> DoomedIds = new Collection<int>();
                foreach( LandingPageData.LandingPageItem PageItem in PageData.LandingPageItems )
                {
                    if( PageItem.Text == "Pending Requests" )
                    {
                        _CswNbtSchemaModTrnsctn.getLandingPageTable().addLandingPageItem( new LandingPageData.Request
                            {
                                Type = CswEnumNbtLandingPageItemType.Link,
                                RoleId = CisproRequestFulfillerRole.NodeId.ToString(),
                                Text = "Submitted Requests",
                                NodeViewId = PageItem.ViewId,
                                PkValue = PageItem.ViewId,
                                ButtonIcon = "cart.png",
                                ViewType = CswEnumNbtViewType.View.ToString()
                            } );
                        DoomedIds.Add( CswConvert.ToInt32( PageItem.LandingPageId ) );
                    }
                }
                foreach( int DoomedId in DoomedIds )
                {
                    _CswNbtSchemaModTrnsctn.getLandingPageTable().deleteLandingPageItem( new LandingPageData.Request { LandingPageId = DoomedId } );
                }

            }

            foreach( CswEnumNbtObjectClass Member in CswNbtPropertySetRequestItem.Members() )
            {
                CswNbtMetaDataObjectClass MemberOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( Member );
                foreach( CswNbtMetaDataNodeType NodeType in MemberOc.getLatestVersionNodeTypes() )
                {
                    CswNbtMetaDataNodeTypeProp CommentsNtp = NodeType.getNodeTypePropByObjectClassProp( CswNbtPropertySetRequestItem.PropertyName.Comments );
                    CommentsNtp.updateLayout( CswEnumNbtLayoutType.Add, false );

                    if( null != CisproRequestFulfillerRole )
                    {
                        _CswNbtSchemaModTrnsctn.Permit.set( CswEnumNbtNodeTypePermission.Edit, NodeType, CisproRequestFulfillerRole, true );
                    }
                }
            }

            CswNbtMetaDataObjectClass RequestOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.RequestClass );
            foreach( CswNbtMetaDataNodeType RequestNt in RequestOc.getNodeTypes() )
            {
                RequestNt.NameTemplateValue = "";
                RequestNt.addNameTemplateText( CswNbtObjClassRequest.PropertyName.Name );
                RequestNt.addNameTemplateText( CswNbtObjClassRequest.PropertyName.SubmittedDate );
            }

        } // update()
Ejemplo n.º 2
0
        public override void update()
        {
            CswNbtMetaDataObjectClass RequestOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.RequestClass );
            foreach( CswNbtMetaDataNodeType RequestNt in RequestOc.getLatestVersionNodeTypes() )
            {
                CswNbtMetaDataNodeTypeProp NameNtp = RequestNt.getNodeTypePropByObjectClassProp(CswNbtObjClassRequest.PropertyName.Name.ToString());
                CswNbtMetaDataNodeTypeProp UserNtp = RequestNt.getNodeTypePropByObjectClassProp(CswNbtObjClassRequest.PropertyName.Requestor.ToString());
                CswNbtMetaDataNodeTypeProp DateNtp = RequestNt.getNodeTypePropByObjectClassProp(CswNbtObjClassRequest.PropertyName.SubmittedDate.ToString());
                RequestNt.NameTemplateValue = "";
                RequestNt.addNameTemplateText(NameNtp.PropName);
                RequestNt.addNameTemplateText(UserNtp.PropName);
                RequestNt.addNameTemplateText(DateNtp.PropName);
            }


        }//Update()