private void _createFireClassExemptAmountNode( double SortOrder, string HazardClass, string HazardType, string HazardCategory, string CategoryFootnotes = "", string Class = "", string SSEA = "", string SSEF = "", string SLEA = "", string SLEF = "", string SGEA = "", string SGEF = "", string CSEA = "", string CSEF = "", string CLEA = "", string CLEF = "", string CGEA = "", string CGEF = "", string OSEA = "", string OSEF = "", string OLEA = "", string OLEF = "", bool isRadioactive = false) { String RadioactiveSuffix = HazardClass == "RAD-Alpha" ? " mCi" : " Ci"; String SolidSuffix = isRadioactive ? RadioactiveSuffix : " lbs";//or ""? String LiquidSuffix = isRadioactive ? RadioactiveSuffix : " gal"; String GasSuffix = isRadioactive ? RadioactiveSuffix : " cu.ft."; CswNbtObjClassFireClassExemptAmount FireClassExemptAmountNode = _CswNbtSchemaModTrnsctn.Nodes.makeNodeFromNodeTypeId( FireClassExemptAmountNT.NodeTypeId, CswNbtNodeCollection.MakeNodeOperation.WriteNode ); FireClassExemptAmountNode.SetName.RelatedNodeId = SetNodeId; FireClassExemptAmountNode.SortOrder.Value = SortOrder; FireClassExemptAmountNode.HazardClass.Value = HazardClass; FireClassExemptAmountNode.Class.Text = Class; FireClassExemptAmountNode.HazardType.Value = HazardType; FireClassExemptAmountNode.HazardCategory.Text = HazardCategory; FireClassExemptAmountNode.CategoryFootnotes.Text = CategoryFootnotes; FireClassExemptAmountNode.StorageSolidExemptAmount.Text = SSEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( SSEA ) || SSEA.Contains( "NL" ) ? "" : SolidSuffix ); FireClassExemptAmountNode.StorageSolidExemptFootnotes.Text = SSEF; FireClassExemptAmountNode.StorageLiquidExemptAmount.Text = SLEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( SLEA ) || SLEA.Contains( "NL" ) ? "" : LiquidSuffix ); FireClassExemptAmountNode.StorageLiquidExemptFootnotes.Text = SLEF; FireClassExemptAmountNode.StorageGasExemptAmount.Text = SGEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( SGEA ) || SGEA.Contains( "NL" ) ? "" : GasSuffix ); FireClassExemptAmountNode.StorageGasExemptFootnotes.Text = SGEF; FireClassExemptAmountNode.ClosedSolidExemptAmount.Text = CSEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( CSEA ) || CSEA.Contains( "NL" ) ? "" : SolidSuffix ); FireClassExemptAmountNode.ClosedSolidExemptFootnotes.Text = CSEF; FireClassExemptAmountNode.ClosedLiquidExemptAmount.Text = CLEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( CLEA ) || CLEA.Contains( "NL" ) ? "" : LiquidSuffix ); FireClassExemptAmountNode.ClosedLiquidExemptFootnotes.Text = CLEF; FireClassExemptAmountNode.ClosedGasExemptAmount.Text = CGEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( CGEA ) || CGEA.Contains( "NL" ) ? "" : GasSuffix ); FireClassExemptAmountNode.ClosedGasExemptFootnotes.Text = CGEF; FireClassExemptAmountNode.OpenSolidExemptAmount.Text = OSEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( OSEA ) || OSEA.Contains( "NL" ) ? "" : SolidSuffix ); FireClassExemptAmountNode.OpenSolidExemptFootnotes.Text = OSEF; FireClassExemptAmountNode.OpenLiquidExemptAmount.Text = OLEA + ( isRadioactive ? RadioactiveSuffix : "" );// ( String.IsNullOrEmpty( OLEA ) || OLEA.Contains( "NL" ) ? "" : LiquidSuffix ); FireClassExemptAmountNode.OpenLiquidExemptFootnotes.Text = OLEF; FireClassExemptAmountNode.postChanges( false ); }
} // update() #region Private Helper Functions private void _createFireClassExemptAmountNode( double SortOrder, string HazardClass, string Class, string HazardType, string HazardCategory ) { CswNbtObjClassFireClassExemptAmount FireClassExemptAmountNode = _CswNbtSchemaModTrnsctn.Nodes.makeNodeFromNodeTypeId( FireClassExemptAmountNT.NodeTypeId, CswEnumNbtMakeNodeOperation.WriteNode ); FireClassExemptAmountNode.SetName.RelatedNodeId = SetNameNodeId; FireClassExemptAmountNode.HazardCategory.Text = HazardCategory; FireClassExemptAmountNode.HazardClass.Value = HazardClass; FireClassExemptAmountNode.Class.Text = Class; FireClassExemptAmountNode.HazardType.Value = HazardType; FireClassExemptAmountNode.SortOrder.Value = SortOrder; FireClassExemptAmountNode.postChanges( false ); }
public override void update() { // We need to correct the spelling of 'baled' to 'bailed' on one specific FireClassExemptAmount Node CswNbtMetaDataObjectClass FireClassExemptAmountOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.FireClassExemptAmountClass ); foreach( ObjClasses.CswNbtNode Node in FireClassExemptAmountOC.getNodes( false, true, true, true ) ) { CswNbtObjClassFireClassExemptAmount CurrentFCEANode = (CswNbtObjClassFireClassExemptAmount) Node; if( CurrentFCEANode.NodeName == "Combustible Fiber/Dust (baled)" ) { CurrentFCEANode.Class.Text = "(bailed)"; CurrentFCEANode.HazardClass.Value = "CF/D (bailed)"; CurrentFCEANode.HazardClass.SyncGestalt(); CurrentFCEANode.postChanges( true ); break; } } } // update()