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.getLatestVersionNodeTypes() ) { CswNbtMetaDataNodeTypeProp StatusNtp = ContainerNt.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.StatusPropertyName ); StatusNtp.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp LocationVerifiedNtp = ContainerNt.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.LocationVerifiedPropertyName ); LocationVerifiedNtp.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp SourceContainerNtp = ContainerNt.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.SourceContainerPropertyName ); SourceContainerNtp.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp DisposedNtp = ContainerNt.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.DisposedPropertyName ); DisposedNtp.removeFromAllLayouts(); } CswNbtMetaDataNodeType ChemicalNt = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Chemical" ); if( null != ChemicalNt ) { CswNbtMetaDataFieldType Memo = _CswNbtSchemaModTrnsctn.MetaData.getFieldType( CswNbtMetaDataFieldType.NbtFieldType.Memo ); CswNbtMetaDataNodeTypeProp SahNtp = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp( ChemicalNt, Memo, "Storage and Handling" ) ); CswNbtMetaDataNodeTypeTab HazardsTab = ChemicalNt.getNodeTypeTab( "Hazards" ); if( null == HazardsTab ) { HazardsTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ChemicalNt, "Hazards", Int32.MinValue ); } SahNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, HazardsTab.TabId ); CswNbtMetaDataFieldType Text = _CswNbtSchemaModTrnsctn.MetaData.getFieldType( CswNbtMetaDataFieldType.NbtFieldType.Text ); CswNbtMetaDataNodeTypeProp IsoNtp = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp( ChemicalNt, Text, "Isotope" ) ); CswNbtMetaDataNodeTypeTab PhysicalTab = ChemicalNt.getNodeTypeTab( "Physical" ); if( null == PhysicalTab ) { PhysicalTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ChemicalNt, "Physical", Int32.MinValue ); } IsoNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, PhysicalTab.TabId ); } }//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()