public override void update() { // Add nodetypes for the new object class CswNbtMetaDataObjectClass RegListListCodeOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.RegulatoryListListCodeClass ); CswNbtMetaDataObjectClassProp RegListListCodeRegListOCP = RegListListCodeOC.getObjectClassProp( CswNbtObjClassRegulatoryListListCode.PropertyName.RegulatoryList ); CswNbtMetaDataNodeType RegListListCodeNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Regulatory List List Code" ); if( null == RegListListCodeNT ) { RegListListCodeNT = _CswNbtSchemaModTrnsctn.MetaData.makeNewNodeType( new CswNbtWcfMetaDataModel.NodeType( RegListListCodeOC ) { NodeTypeName = "Regulatory List List Code", Category = "Materials", SearchDeferObjectClassPropId = RegListListCodeRegListOCP.ObjectClassPropId } ); } // Set the Name Template RegListListCodeNT.setNameTemplateText( CswNbtMetaData.MakeTemplateEntry( CswNbtObjClassRegulatoryListListCode.PropertyName.RegulatoryList ) + "-" + CswNbtMetaData.MakeTemplateEntry( CswNbtObjClassRegulatoryListListCode.PropertyName.LOLIListName ) ); // Hide the LOLI List Code Property from Users CswNbtMetaDataNodeTypeProp RegListListCodeListCodeNTP = RegListListCodeNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRegulatoryListListCode.PropertyName.LOLIListCode ); RegListListCodeListCodeNTP.removeFromAllLayouts(); } // update()
public override void update() { CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass ); foreach( CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp HazardInfoNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.HazardInfo ); HazardInfoNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp DisposalNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.DisposalInstructions ); DisposalNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp SMILESNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.SMILES ); SMILESNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp CompGasNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.CompressedGas ); CompGasNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp DOTCodeNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.DOTCode ); DOTCodeNTP.removeFromAllLayouts(); DOTCodeNTP.MaxValue = 999; //DOT codes are 3 numbers DOTCodeNTP.MinValue = 0; CswNbtMetaDataNodeTypeProp OpenExpireIntervalNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.OpenExpireInterval ); OpenExpireIntervalNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp EINECSNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.EINECS ); EINECSNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp SubclassNameNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.SubclassName ); SubclassNameNTP.removeFromAllLayouts(); } } // update()
public override void update() { CswSequenceName assemblySequenceName = new CswSequenceName( "Assembly Barcode" ); int sequenceId; if( false == _CswNbtSchemaModTrnsctn.doesSequenceExist( assemblySequenceName ) ) { sequenceId = _CswNbtSchemaModTrnsctn.makeSequence( assemblySequenceName, "AS", "", 6, 0 ); } else { sequenceId = CswConvert.ToInt32( _CswNbtSchemaModTrnsctn.getSequence( assemblySequenceName ).Rows[0]["sequenceid"] ); } CswNbtMetaDataObjectClass assemblyOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.EquipmentAssemblyClass ); foreach( CswNbtMetaDataNodeType assemblyNT in assemblyOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp barcodeNTP = assemblyNT.getNodeTypePropByObjectClassProp( CswNbtObjClassEquipmentAssembly.PropertyName.Barcode ); if( Int32.MinValue == barcodeNTP.SequenceId ) { barcodeNTP.setSequence( sequenceId ); } barcodeNTP.removeFromAllLayouts(); _CswNbtSchemaModTrnsctn.MetaData.NodeTypeLayout.updatePropLayout( CswEnumNbtLayoutType.Edit, assemblyNT.NodeTypeId, barcodeNTP, true, TabId: assemblyNT.getIdentityTab().TabId ); } } // update()
public override void update() { CswNbtMetaDataObjectClass DocumentOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.DocumentClass ); CswNbtMetaDataNodeType SDSNT = _CswNbtSchemaModTrnsctn.MetaData.makeNewNodeType( new CswNbtWcfMetaDataModel.NodeType( DocumentOC ) { NodeTypeName = "SDS Document", Category = "Materials" } ); CswNbtMetaDataNodeTypeProp TradeNameNTP = SDSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.Owner ); CswNbtMetaDataNodeType ChemicalNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Chemical" ); if( null != ChemicalNT ) { TradeNameNTP.SetFK( NbtViewRelatedIdType.NodeTypeId.ToString(), ChemicalNT.NodeTypeId ); } TradeNameNTP.PropName = "Tradename"; CswNbtMetaDataNodeTypeProp RevisionDateNTP = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp( SDSNT, _CswNbtSchemaModTrnsctn.MetaData.getFieldType( CswNbtMetaDataFieldType.NbtFieldType.DateTime ), "Revision Date" ) ); CswNbtMetaDataNodeTypeProp LanguageNTP = SDSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.Language ); LanguageNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, SDSNT.getFirstNodeTypeTab().TabId ); CswNbtMetaDataNodeTypeProp FormatNTP = SDSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.Format ); FormatNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, SDSNT.getFirstNodeTypeTab().TabId ); SDSNT.setNameTemplateText( CswNbtMetaData.MakeTemplateEntry( CswNbtObjClassDocument.PropertyName.Title ) ); foreach( CswNbtMetaDataNodeType DocNT in DocumentOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp DocClassNTP = DocNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.DocumentClass ); DocClassNTP.removeFromAllLayouts(); } } //Update()
public override void update() { CswNbtMetaDataNodeType ContainerNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Container" ); if( null != ContainerNT ) { CswNbtMetaDataNodeTypeTab FireCodeTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNT, "Fire Code" ); CswNbtMetaDataNodeTypeProp StoragePressureNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.StoragePressure ); CswNbtMetaDataNodeTypeProp StorageTemperatureNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.StorageTemperature ); CswNbtMetaDataNodeTypeProp UseTypeNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.UseType ); StoragePressureNTP.removeFromAllLayouts(); StorageTemperatureNTP.removeFromAllLayouts(); UseTypeNTP.removeFromAllLayouts(); StoragePressureNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, FireCodeTab.TabId, 1, 1 ); StorageTemperatureNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, FireCodeTab.TabId, 2, 1 ); UseTypeNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, FireCodeTab.TabId, 3, 1 ); foreach( CswNbtMetaDataNodeTypeTab Tab in ContainerNT.getNodeTypeTabs() ) { if( Tab.TabOrder >= 4 ) Tab.TabOrder += 1; } CswNbtMetaDataNodeTypeTab DispensesTab = ContainerNT.getNodeTypeTab( "Dispenses" ); if( null == DispensesTab ) { DispensesTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNT, "Dispenses", 4 ); } CswNbtMetaDataNodeTypeProp DispenseNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Dispense ); DispenseNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, DispensesTab.TabId, 1, 1 ); } } //Update()
public override void update() { CswNbtMetaDataObjectClass LocationOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.LocationClass ); foreach( CswNbtMetaDataNodeType LocationNT in LocationOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp NodetypeProp = LocationNT.getNodeTypePropByObjectClassProp( CswNbtObjClassLocation.PropertyName.LocationCode ); NodetypeProp.removeFromAllLayouts(); } } // update()
public override void update() { CswNbtMetaDataObjectClass RegListOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.RegulatoryListClass ); foreach( CswNbtMetaDataNodeType RegListNT in RegListOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp listCodeNTP = RegListNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRegulatoryList.PropertyName.ListCode ); listCodeNTP.removeFromAllLayouts(); } }
public override void update() { // Hide 'Document Class' on equipment documents CswNbtMetaDataNodeType EquipmentDocumentNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Equipment Document" ); if( null != EquipmentDocumentNT ) { CswNbtMetaDataNodeTypeProp DocClassNTP = EquipmentDocumentNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.DocumentClass ); DocClassNTP.removeFromAllLayouts(); } } //update()
public override void update() { CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass ); foreach( CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp LQNoNTP = ChemicalNT.getNodeTypePropByObjectClassProp(CswNbtObjClassChemical.PropertyName.LQNo); LQNoNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp UNCodeNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.UNCode ); UNCodeNTP.removeFromAllLayouts(); } } // update()
public override void update() { // Remove C3ACDPreferredSuppliers from all layouts CswNbtMetaDataObjectClass UserOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.UserClass ); foreach( CswNbtMetaDataNodeType UserNT in UserOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp C3ACDPrefSuppliersNTP = UserNT.getNodeTypePropByObjectClassProp( CswNbtObjClassUser.PropertyName.C3ACDPreferredSuppliers ); C3ACDPrefSuppliersNTP.removeFromAllLayouts(); } } // update()
public override void update() { CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass ); foreach( CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp AssignedSDSNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.AssignedSDS ); CswNbtMetaDataNodeTypeProp LinkChemWatchNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.LinkChemWatch ); LinkChemWatchNTP.removeFromAllLayouts(); LinkChemWatchNTP.updateLayout( CswEnumNbtLayoutType.Edit, AssignedSDSNTP, true ); } } // update()
public override void update() { // Remove the ChemWatch property from all layouts CswNbtMetaDataObjectClass SDSDocumentOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.SDSDocumentClass ); foreach( CswNbtMetaDataNodeType SDSDocNT in SDSDocumentOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp ChemWatchNTP = SDSDocNT.getNodeTypePropByObjectClassProp( CswNbtObjClassSDSDocument.PropertyName.ChemWatch ); ChemWatchNTP.removeFromAllLayouts(); ChemWatchNTP.ReadOnly = true; ChemWatchNTP.Hidden = true; } } // update()
public override void update() { CswNbtMetaDataObjectClass MaterialOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.MaterialClass ); foreach( CswNbtMetaDataNodeType MaterialNT in MaterialOC.getNodeTypes() ) { if (MaterialNT.NodeTypeName != "Chemical" ) { CswNbtMetaDataNodeTypeProp CasNoNTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypePropByObjectClassProp( MaterialNT.NodeTypeId, CswNbtObjClassMaterial.PropertyName.CasNo ); CasNoNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp IsTierIINTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypePropByObjectClassProp( MaterialNT.NodeTypeId, CswNbtObjClassMaterial.PropertyName.IsTierII ); IsTierIINTP.removeFromAllLayouts(); } } }//Update()
public override void update() { CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass ); if( null != ChemicalOC ) { foreach( CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes() ) { // Remove Regulatory Lists Grid header on Chemical CswNbtMetaDataNodeTypeProp RegListsGridNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.RegulatoryListsGrid ); RegListsGridNTP.Attribute1 = false.ToString(); // case 28303 - Hide Suppressed Regulatory Lists prop CswNbtMetaDataNodeTypeProp SuppressedRegListsNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.SuppressedRegulatoryLists ); SuppressedRegListsNTP.removeFromAllLayouts(); } } CswNbtMetaDataObjectClass RegListOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.RegulatoryListClass ); CswNbtMetaDataObjectClass RegListMemberOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.RegulatoryListMemberClass ); if( null != RegListOC && null != RegListMemberOC ) { foreach( CswNbtMetaDataNodeType RegListNT in RegListOC.getNodeTypes() ) { // Fix help text on Regulatory List 'Add CAS Numbers' property CswNbtMetaDataNodeTypeProp AddCasNosNTP = RegListNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRegulatoryList.PropertyName.AddCASNumbers ); AddCasNosNTP.HelpText = @"Enter a list of CAS numbers to add to this regulatory list, delimited by commas or newlines."; // Add help text to Regulatory List 'Exclusive' property CswNbtMetaDataNodeTypeProp ExclusiveNTP = RegListNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRegulatoryList.PropertyName.Exclusive ); ExclusiveNTP.HelpText = @"If checked, the normal behavior of the regulatory list is reversed; a chemical is only considered a member of the list if it does not match any CAS number on the list."; // Fix property name of CASNosGrid CswNbtMetaDataNodeTypeProp CASNosGridNTP = RegListNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRegulatoryList.PropertyName.CASNosGrid ); CASNosGridNTP.PropName = CswNbtObjClassRegulatoryList.PropertyName.CASNosGrid; // Add Chemical grid on Regulatory List CswNbtMetaDataNodeTypeTab ChemTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTabDeprecated( RegListNT, "Chemicals", 2 ); CswNbtMetaDataNodeTypeProp ChemGrid = _CswNbtSchemaModTrnsctn.MetaData.makeNewPropDeprecated( RegListNT, CswEnumNbtFieldType.Grid, "Chemicals", ChemTab.TabId ); CswNbtView ChemView = _CswNbtSchemaModTrnsctn.restoreView( ChemGrid.ViewId ); ChemView.Root.ChildRelationships.Clear(); CswNbtViewRelationship regListRel = ChemView.AddViewRelationship( RegListOC, false ); CswNbtViewRelationship memberRel = ChemView.AddViewRelationship( regListRel, CswEnumNbtViewPropOwnerType.Second, RegListMemberOC.getObjectClassProp( CswNbtObjClassRegulatoryListMember.PropertyName.RegulatoryList ), false ); CswNbtViewRelationship chemRel = ChemView.AddViewRelationship( memberRel, CswEnumNbtViewPropOwnerType.First, RegListMemberOC.getObjectClassProp( CswNbtObjClassRegulatoryListMember.PropertyName.Chemical ), false ); ChemView.AddViewProperty( chemRel, ChemicalOC.getObjectClassProp( CswNbtObjClassChemical.PropertyName.TradeName ) ); ChemView.AddViewProperty( chemRel, ChemicalOC.getObjectClassProp( CswNbtObjClassChemical.PropertyName.CasNo ) ); ChemView.save(); } } } // update()
public override void update() { CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass ); foreach( CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp LegacyMaterialIdNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.LegacyMaterialId ); LegacyMaterialIdNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp ProductDescriptionNTP = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.ProductDescription ); ProductDescriptionNTP.removeFromAllLayouts(); } } // update()
/// <summary> /// Update logic /// </summary> public override void update() { /* Get the Vendor NT and hide the newly created properties */ CswNbtMetaDataNodeType vendorNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Vendor" ); if( null != vendorNT ) { CswNbtMetaDataNodeTypeProp corporateEntityNTP = vendorNT.getNodeTypePropByObjectClassProp( CswNbtObjClassVendor.PropertyName.CorporateEntityName ); corporateEntityNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp vendorTypeNTP = vendorNT.getNodeTypePropByObjectClassProp( CswNbtObjClassVendor.PropertyName.VendorTypeName ); vendorTypeNTP.removeFromAllLayouts(); } }//Update()
public override void update() { CswNbtMetaDataObjectClass ReportOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ReportClass ); foreach( CswNbtMetaDataNodeType ReportNT in ReportOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp SqlNTP = ReportNT.getNodeTypePropByObjectClassProp( CswNbtObjClassReport.PropertyName.Sql ); CswNbtMetaDataNodeTypeProp WebServiceNTP = ReportNT.getNodeTypePropByObjectClassProp( CswNbtObjClassReport.PropertyName.WebService ); if( null != WebServiceNTP ) { WebServiceNTP.removeFromAllLayouts(); WebServiceNTP.updateLayout( CswEnumNbtLayoutType.Edit, SqlNTP, true ); } } } // update()
public static void CreateCafProps(CswNbtResources NbtResources, List <string> NodeTypes, string PropsValsTblName, string PropsValsPKName, CswEnumSetupMode SetupMode) { CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(new CswNbtSchemaModTrnsctn(NbtResources), "CAF", ImporterSetUpMode: SetupMode); string sql = GetCAFPropertiesSQL(PropsValsTblName, NodeTypes); CswArbitrarySelect cafChemPropAS = NbtResources.makeCswArbitrarySelect("cafProps_" + PropsValsPKName, sql); DataTable cafChemPropsDT = cafChemPropAS.getTable(); foreach (DataRow row in cafChemPropsDT.Rows) { foreach (string nt in NodeTypes) { CswNbtMetaDataNodeType NodeType = NbtResources.MetaData.getNodeType(nt); string PropName = row["propertyname"].ToString(); int PropId = CswConvert.ToInt32(row["propertyid"]); PropName = GetUniquePropName(NodeType, PropName); //keep appending numbers until we have a unique prop name CswEnumNbtFieldType propFT = GetFieldTypeFromCAFPropTypeCode(row["propertytype"].ToString()); CswNbtMetaDataNodeTypeProp newProp = NbtResources.MetaData.makeNewProp(new CswNbtWcfMetaDataModel.NodeTypeProp(NodeType, NbtResources.MetaData.getFieldType(propFT), PropName) { IsRequired = CswConvert.ToBoolean(row["required"]), ReadOnly = CswConvert.ToBoolean(row["readonly"]), ListOptions = CswConvert.ToString(row["listopts"]) }); newProp.removeFromAllLayouts(); string cafColPropName = "prop" + row["propertyid"]; string cafSourceCol = "propvaltext"; if (CswEnumNbtFieldType.DateTime == propFT) { cafSourceCol = "propvaldate"; } else if (CswEnumNbtFieldType.Number == propFT) { cafSourceCol = "propvalnumber"; } ImpMgr.importBinding(cafSourceCol, PropName, "", "CAF", NodeType.NodeTypeName, ClobTableName: PropsValsTblName, LobDataPkColOverride: cafColPropName, LobDataPkColName: PropsValsPKName, LegacyPropId: PropId); } } NbtResources.commitTransaction(); ImpMgr.finalize(); }
public override void update() { CswNbtMetaDataPropertySet MaterialPS = _CswNbtSchemaModTrnsctn.MetaData.getPropertySet( CswEnumNbtPropertySetName.MaterialSet ); foreach( CswNbtMetaDataObjectClass objectClass in MaterialPS.getObjectClasses() ) { foreach( CswNbtMetaDataNodeType nodeType in objectClass.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp LegacyMaterialIdNTP = nodeType.getNodeTypeProp( CswNbtPropertySetMaterial.PropertyName.LegacyMaterialId ); if( null != LegacyMaterialIdNTP ) { LegacyMaterialIdNTP.removeFromAllLayouts(); } } } } // update()
public override void update() { CswNbtMetaDataObjectClass SizeOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.SizeClass ); CswNbtMetaDataNodeType SizeNt = SizeOc.FirstNodeType; if( SizeNt != null ) { //Hide Dispensable and QuantityEditable properties CswNbtMetaDataNodeTypeProp DispensableNtp = SizeNt.getNodeTypePropByObjectClassProp( CswNbtObjClassSize.PropertyName.Dispensable ); DispensableNtp.removeFromAllLayouts(); CswNbtMetaDataNodeTypeProp QuantityEditableNtp = SizeNt.getNodeTypePropByObjectClassProp( CswNbtObjClassSize.PropertyName.QuantityEditable ); QuantityEditableNtp.removeFromAllLayouts(); } }//Update()
public override void update() { if (_CswNbtSchemaModTrnsctn.isMaster()) { CswNbtMetaDataObjectClass UserOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.UserClass); foreach (CswNbtMetaDataNodeType UserNT in UserOC.getNodeTypes()) { CswNbtMetaDataNodeTypeTab firstTab = UserNT.getFirstNodeTypeTab(); CswNbtMetaDataNodeTypeProp CostCodeNTP = UserNT.getNodeTypePropByObjectClassProp(CswNbtObjClassUser.PropertyName.CostCode); CostCodeNTP.removeFromAllLayouts(); CostCodeNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId); } } }
public override void update() { // Remove the HazardClassesNTP from all layouts for any MaterialNTs != Chemical CswNbtMetaDataObjectClass MaterialOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass ); if( null != MaterialOC ) { foreach( CswNbtMetaDataNodeType MaterialNT in MaterialOC.getNodeTypes() ) { if( false == MaterialNT.NodeTypeName.Equals( "Chemical" ) ) { CswNbtMetaDataNodeTypeProp HazardClassesNTP = MaterialNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.HazardClasses ); HazardClassesNTP.removeFromAllLayouts(); } } } } // update()
} // update() //From MLM module private void _toggleMaterialRequestApprovalLevel( CswEnumNbtObjectClass ObjClass, bool MLMDisabled ) { CswNbtMetaDataObjectClass createMaterialRequestOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( ObjClass ); foreach( CswNbtMetaDataNodeType createMaterialRequestNT in createMaterialRequestOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp approvalLevelNT = createMaterialRequestNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRequestMaterialCreate.PropertyName.ApprovalLevel ); if( MLMDisabled ) { approvalLevelNT.removeFromAllLayouts(); } else { CswNbtMetaDataNodeTypeTab firstTab = createMaterialRequestNT.getFirstNodeTypeTab(); approvalLevelNT.updateLayout( CswEnumNbtLayoutType.Edit, true, TabId: firstTab.TabId ); approvalLevelNT.updateLayout( CswEnumNbtLayoutType.Add, true ); } } }
public override void update() { CswNbtMetaDataObjectClass MailReportOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.MailReportClass ); foreach( CswNbtMetaDataNodeType MailReportNt in MailReportOc.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp WarningDaysNtp = MailReportNt.getNodeTypePropByObjectClassProp( CswNbtObjClassMailReport.PropertyName.WarningDays ); WarningDaysNtp.removeFromAllLayouts(); WarningDaysNtp.DefaultValue.AsNumber.Value = 0; } foreach( CswNbtObjClassMailReport MailReportNode in MailReportOc.getNodes( false, false ) ) { if( null != MailReportNode.WarningDays ) { MailReportNode.WarningDays.Value = 0; MailReportNode.postChanges( false ); } } }//Update()
public override void update() { //Add Legacy Id NTP to all NTs and make sure it's hidden string LegacyIdPropName = "Legacy Id"; CswNbtMetaDataFieldType numberFT = _CswNbtSchemaModTrnsctn.MetaData.getFieldType( CswNbtMetaDataFieldType.NbtFieldType.Number ); foreach( CswNbtMetaDataNodeType NodeType in _CswNbtSchemaModTrnsctn.MetaData.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp legacyIdNTP = NodeType.getNodeTypeProp( LegacyIdPropName ); if( null == legacyIdNTP ) { legacyIdNTP = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp( NodeType, numberFT, LegacyIdPropName ) ); legacyIdNTP.ServerManaged = true; } legacyIdNTP.removeFromAllLayouts(); } } //Update()
public override void update() { CswNbtMetaDataNodeType VolumeUnitNodeType = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Unit (Volume)" ); if( null != VolumeUnitNodeType ) { createUnitOfMeasureNode( VolumeUnitNodeType.NodeTypeId, "cu.ft.", 3.53147, -2, Tristate.True ); } CswNbtMetaDataNodeType RadiationUnitNodeType = _CswNbtSchemaModTrnsctn.MetaData.makeNewNodeType( "UnitOfMeasureClass", "Unit (Radiation)", "Units" ); RadiationUnitNodeType.setNameTemplateText( CswNbtMetaData.MakeTemplateEntry( CswNbtObjClassUnitOfMeasure.PropertyName.Name ) ); CswNbtMetaDataNodeTypeProp RadiationBaseUnitProp = RadiationUnitNodeType.getNodeTypeProp( CswNbtObjClassUnitOfMeasure.PropertyName.BaseUnit ); RadiationBaseUnitProp.DefaultValue.AsText.Text = "Ci"; CswNbtMetaDataNodeTypeProp RadiationUnitTypeProp = RadiationUnitNodeType.getNodeTypeProp( CswNbtObjClassUnitOfMeasure.PropertyName.UnitType ); RadiationUnitTypeProp.DefaultValue.AsList.Value = CswNbtObjClassUnitOfMeasure.UnitTypes.Radiation.ToString(); RadiationUnitTypeProp.removeFromAllLayouts(); createUnitOfMeasureNode( RadiationUnitNodeType.NodeTypeId, "Ci", 1.0, 0, Tristate.True ); createUnitOfMeasureNode( RadiationUnitNodeType.NodeTypeId, "mCi", 1.0, 3, Tristate.True ); createUnitOfMeasureNode( RadiationUnitNodeType.NodeTypeId, "Bq", 2.7027027, -11, Tristate.True ); }
public override void update() { CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass ); foreach( CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp NodetypeProp = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.AddLabelCodes ); //NodetypeProp.Hidden = true; NodetypeProp.removeFromAllLayouts(); } // Add material to name template for ghs nodetypes CswNbtMetaDataObjectClass GHSOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.GHSClass ); foreach( CswNbtMetaDataNodeType GHSNT in GHSOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp JurisdictionNTP = GHSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassGHS.PropertyName.Jurisdiction ); CswNbtMetaDataNodeTypeProp MaterialNTP = GHSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassGHS.PropertyName.Material ); GHSNT.setNameTemplateText( CswNbtMetaData.MakeTemplateEntry( JurisdictionNTP.PropName ) + " " + CswNbtMetaData.MakeTemplateEntry( MaterialNTP.PropName ) ); } } // update()
public override void update() { // this is also in CswNbtModuleRuleCISPro if( false == _CswNbtSchemaModTrnsctn.Modules.IsModuleEnabled( CswNbtModuleName.CISPro ) ) { CswNbtMetaDataObjectClass LocationOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.LocationClass ); foreach( CswNbtMetaDataNodeType LocationNT in LocationOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp LocationContainersGridNTP = LocationNT.getNodeTypeProp( "Containers" ); if( null != LocationContainersGridNTP ) { LocationContainersGridNTP.removeFromAllLayouts(); CswNbtMetaDataNodeTypeTab LocationContainersTab = LocationNT.getNodeTypeTab( "Containers" ); if( LocationContainersTab != null ) { _CswNbtSchemaModTrnsctn.MetaData.DeleteNodeTypeTab( LocationContainersTab ); } } } } } //Update()
public override void update() { CswNbtMetaDataObjectClass ContainerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ContainerClass ); foreach( CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp ReceiptLotNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.ReceiptLot ); if( null != ReceiptLotNTP ) { ReceiptLotNTP.Hidden = false; if( _CswNbtSchemaModTrnsctn.Modules.IsModuleEnabled( CswEnumNbtModuleName.MLM ) ) { CswNbtMetaDataNodeTypeProp DateCreatedNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.DateCreated ); ReceiptLotNTP.updateLayout( CswEnumNbtLayoutType.Edit, DateCreatedNTP, true ); } else { ReceiptLotNTP.removeFromAllLayouts(); } } } }
public override void update() { foreach( CswNbtMetaDataNodeType NodeType in _CswNbtSchemaModTrnsctn.MetaData.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp SaveNtp = NodeType.getNodeTypePropByObjectClassProp( CswNbtObjClass.PropertyName.Save ); if( null != SaveNtp ) { SaveNtp.removeFromAllLayouts(); SaveNtp.updateLayout(LayoutType: CswEnumNbtLayoutType.Add, DoMove: false, DisplayColumn: 1, DisplayRow: Int32.MaxValue ); foreach( CswNbtMetaDataNodeTypeTab Tab in NodeType.getNodeTypeTabs() ) { if( Tab != NodeType.getIdentityTab() ) { SaveNtp.updateLayout( LayoutType : CswEnumNbtLayoutType.Edit, DoMove : false, DisplayColumn : 1, DisplayRow: Int32.MaxValue, TabId: Tab.TabId ); } } } } } //Update()