public override void update() { CswNbtMetaDataObjectClass ContainerOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.ContainerClass ); _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOc, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswNbtMetaDataFieldType.NbtFieldType.Button, PropName = CswNbtObjClassContainer.RequestPropertyName, Extended = CswNbtNodePropButton.ButtonMode.menu, ListOptions = CswNbtObjClassContainer.RequestMenu.Options.ToString(), StaticText = CswNbtObjClassContainer.RequestMenu.Dispense } ); foreach( CswNbtMetaDataNodeType ContainerNt in ContainerOc.getNodeTypes() ) { CswNbtMetaDataNodeTypeTab RequestsTab = ContainerNt.getNodeTypeTab( "Requests" ); if( null == RequestsTab ) { RequestsTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNt, "Requests", ContainerNt.getNodeTypeTabIds().Count ); } CswNbtMetaDataNodeTypeProp DispenseNtp = ContainerNt.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.RequestPropertyName ); DispenseNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, RequestsTab.TabId, 1, 1 ); DispenseNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Table, true, RequestsTab.TabId, 1, 1 ); CswNbtMetaDataNodeTypeProp RequestsGridNtp = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( ContainerNt, CswNbtMetaDataFieldType.NbtFieldType.Grid, "Submitted Requests", RequestsTab.TabId ); CswNbtView GridView = _CswNbtSchemaModTrnsctn.ViewSelect.restoreView( RequestsGridNtp.ViewId ); makeRequestGridView( GridView, ContainerNt ); } CswNbtMetaDataObjectClass MaterialOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.MaterialClass ); CswNbtMetaDataObjectClassProp MaterialRequestOcp = _CswNbtSchemaModTrnsctn.createObjectClassProp( MaterialOc, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswNbtMetaDataFieldType.NbtFieldType.Button, PropName = CswNbtObjClassMaterial.RequestPropertyName } ); foreach( CswNbtMetaDataNodeType MaterialNt in MaterialOc.getNodeTypes() ) { CswNbtMetaDataNodeTypeTab IdentityTab = MaterialNt.getNodeTypeTab( "Identity" ); if( null == IdentityTab ) { IdentityTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab(MaterialNt, "Identity", MaterialNt.getNodeTypeTabIds().Count); } CswNbtMetaDataNodeTypeProp RequestBtnNtp = MaterialNt.getNodeTypePropByObjectClassProp( CswNbtObjClassMaterial.RequestPropertyName ); RequestBtnNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, IdentityTab.TabId ); } }//Update()
public override void update() { CswNbtMetaDataObjectClass ContainerOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.ContainerClass ); foreach( CswNbtMetaDataNodeType ContainerNt in ContainerOc.getNodeTypes() ) { CswNbtMetaDataNodeTypeTab DispenseTransactionTab = ContainerNt.getNodeTypeTab( "Dispenses" ); if( null == DispenseTransactionTab ) { DispenseTransactionTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNt, "Dispenses", ContainerNt.getNodeTypeTabIds().Count ); } CswNbtMetaDataNodeTypeProp DispenseGridNtp = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( ContainerNt, CswNbtMetaDataFieldType.NbtFieldType.Grid, "Container Dispense Transactions", DispenseTransactionTab.TabId ); CswNbtView GridView = _CswNbtSchemaModTrnsctn.ViewSelect.restoreView( DispenseGridNtp.ViewId ); makeDispenseTransactionGridView( GridView, ContainerNt ); } }//Update()
public override void update() { CswNbtMetaDataObjectClass ContainerOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.ContainerClass ); //This block is needed in the event of a full SchemaUpdate reset to ensure that the RequestDispense button only exists on the Requests tab foreach( CswNbtMetaDataNodeType ContainerNt in ContainerOc.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp RequestNtp = ContainerNt.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.RequestPropertyName ); foreach( CswNbtMetaDataNodeTypeTab ContainerNodeTypeTab in _CswNbtSchemaModTrnsctn.MetaData.getNodeTypeTabs( ContainerNt.NodeTypeId ) ) { RequestNtp.removeFromLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, TabId: ContainerNodeTypeTab.TabId ); } CswNbtMetaDataNodeTypeTab RequestsTab = ContainerNt.getNodeTypeTab( "Requests" ); if( null == RequestsTab ) { RequestsTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNt, "Requests", ContainerNt.getNodeTypeTabIds().Count ); } RequestNtp.removeFromLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, ContainerNt.getFirstNodeTypeTab().TabId ); RequestNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, RequestsTab.TabId, 1, 1 ); RequestNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Table, true, RequestsTab.TabId, 1, 1 ); } }//Update()