public override void doUpdate()
        {
            // CAF bindings definitions for Vendors
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.CAFimportOrder("Material Document", "documents", "docs_view", "legacyid", false);

            //simple props
            ImpMgr.importBinding("acquisitiondate", CswNbtObjClassDocument.PropertyName.AcquiredDate, "");
            ImpMgr.importBinding("description", CswNbtObjClassDocument.PropertyName.Title, "");

            //relationships
            ImpMgr.importBinding("packageid", "Material", CswEnumNbtSubFieldName.NodeID.ToString());   //Material Document NTP "Owner" is changed to "Material"

            //transformed props
            ImpMgr.importBinding("fileextension_trans", CswNbtObjClassDocument.PropertyName.FileType, "");

            //file specific bindings
            ImpMgr.importBinding("content_type", CswNbtObjClassSDSDocument.PropertyName.File, CswEnumNbtSubFieldName.ContentType.ToString());
            ImpMgr.importBinding("filename", CswNbtObjClassDocument.PropertyName.File, CswEnumNbtSubFieldName.Name.ToString());

            //Link and BlobData are stored in the same column, we're going to import it twice and let the "FileType" property dictate what is shown
            ImpMgr.importBinding("document", CswNbtObjClassDocument.PropertyName.File, CswEnumNbtSubFieldName.Blob.ToString(), BlobTableName: "documents", LobDataPkColOverride: "documentid");
            ImpMgr.importBinding("document", CswNbtObjClassDocument.PropertyName.Link, CswEnumNbtSubFieldName.Href.ToString(), BlobTableName: "documents", LobDataPkColOverride: "documentid");

            //Use the url as the text that displays for links
            ImpMgr.importBinding("description", CswNbtObjClassDocument.PropertyName.Link, CswEnumNbtSubFieldName.Text.ToString());

            //Legacy Id for documents is "<documentid>_<packageid>" (ex: "123_343")
            ImpMgr.importBinding("legacyid", "Legacy Id", "");

            ImpMgr.finalize();
        }
示例#2
0
        public override void doUpdate()
        {
            // CAF bindings definitions for Vendors
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

            //This is only necessary for the very first CAF script, to create the caf definition
            ImpMgr.importDef( 1, "CAF" );

            ImpMgr.CAFimportOrder( "Vendor", "vendors", PkColumnName: "vendorid" );
            // Binding
            ImpMgr.importBinding( "accountno", CswNbtObjClassVendor.PropertyName.AccountNo, "" );
            ImpMgr.importBinding( "city", CswNbtObjClassVendor.PropertyName.City, "" );
            ImpMgr.importBinding( "contactname", CswNbtObjClassVendor.PropertyName.ContactName, "" );
            ImpMgr.importBinding( "fax", CswNbtObjClassVendor.PropertyName.Fax, "" );
            ImpMgr.importBinding( "phone", CswNbtObjClassVendor.PropertyName.Phone, "" );
            ImpMgr.importBinding( "state", CswNbtObjClassVendor.PropertyName.State, "" );
            ImpMgr.importBinding( "street1", CswNbtObjClassVendor.PropertyName.Street1, "" );
            ImpMgr.importBinding( "street2", CswNbtObjClassVendor.PropertyName.Street2, "" );
            ImpMgr.importBinding( "vendorname", CswNbtObjClassVendor.PropertyName.VendorName, "" );
            ImpMgr.importBinding( "zip", CswNbtObjClassVendor.PropertyName.Zip, "" );

            // Relationship
            // Vendor has no relationships

            ImpMgr.finalize();
        } // update()
        public override void update()
        {
            CswNbtMetaDataObjectClass ComponentOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.MaterialComponentClass);

            // Make new NumericRange property on MaterialComponent
            _CswNbtSchemaModTrnsctn.createObjectClassProp(ComponentOC, new CswNbtWcfMetaDataModel.ObjectClassProp()
            {
                PropName        = CswNbtObjClassMaterialComponent.PropertyName.PercentageRange,
                FieldType       = CswEnumNbtFieldType.NumericRange,
                NumberMinValue  = 0,
                NumberMaxValue  = 100,
                NumberPrecision = 3,
                IsRequired      = true,
                SetValOnAdd     = true,
                AuditLevel      = CswEnumAuditLevel.PlainAudit
            });


            // Fix CAF bindings
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.removeImportBinding(CswScheduleLogicNbtCAFImport.DefinitionName, "quantity", "Material Component", oldTargetPercentageValue, "Value");
            ImpMgr.removeImportBinding(CswScheduleLogicNbtCAFImport.DefinitionName, "quantity", "Material Component", oldHighPercentageValue, "Value");

            ImpMgr.importBinding("quantity", CswNbtObjClassMaterialComponent.PropertyName.PercentageRange, CswNbtFieldTypeRuleNumericRange.SubFieldName.Target.ToString());
            ImpMgr.importBinding("quantity", CswNbtObjClassMaterialComponent.PropertyName.PercentageRange, CswNbtFieldTypeRuleNumericRange.SubFieldName.Upper.ToString());

            ImpMgr.finalize();
        }
        public override void update()
        {
            if (CswNbtImportDef.checkForDefinitionEntries(_CswNbtSchemaModTrnsctn, "CAF"))
            {
                CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

                ImpMgr.CAFimportOrder("Equipment", "materials", "equipment_view", "legacyid", createLegacyId: true);

                //Simple props
                ImpMgr.importBinding("serialno", CswNbtObjClassEquipment.PropertyName.SerialNo, "");
                ImpMgr.importBinding("barcodeid", CswNbtObjClassEquipment.PropertyName.EquipmentId, "");
                ImpMgr.importBinding("expirationdate", CswNbtObjClassEquipment.PropertyName.ServiceEndsOn, "");
                ImpMgr.importBinding("model", CswNbtObjClassEquipment.PropertyName.Model, "");
                ImpMgr.importBinding("manufacturer", CswNbtObjClassEquipment.PropertyName.Manufacturer, "");
                ImpMgr.importBinding("description", CswNbtObjClassEquipment.PropertyName.Description, "");

                //Relationships and Locations
                ImpMgr.importBinding("ownerid", CswNbtObjClassEquipment.PropertyName.User, CswEnumNbtSubFieldName.NodeID.ToString());
                ImpMgr.importBinding("locationid", CswNbtObjClassEquipment.PropertyName.Location, CswEnumNbtSubFieldName.NodeID.ToString());
                ImpMgr.importBinding("materialsubclassid", CswNbtObjClassEquipment.PropertyName.Type, CswEnumNbtSubFieldName.NodeID.ToString());

                //LOB data
                ImpMgr.importBinding("struct_pict", CswNbtObjClassEquipment.PropertyName.Picture, CswEnumNbtSubFieldName.Blob.ToString(), BlobTableName: "materials", LobDataPkColOverride: "materialid");

                ImpMgr.finalize();
            }
        }
示例#5
0
        public override void update()
        {
            {
                CswNbtSchemaUpdateImportMgr UnitMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "units_of_measure", ViewName: "each_view", SourceColumn: "unitofmeasureid", DestNodeTypeName: "Unit_Each");

                UnitMgr.importBinding( "unitofmeasurename", CswNbtObjClassUnitOfMeasure.PropertyName.Name, "" );
                UnitMgr.importBinding( "conversionfactor", CswNbtObjClassUnitOfMeasure.PropertyName.ConversionFactor, "" );
                UnitMgr.importBinding( "unittype", CswNbtObjClassUnitOfMeasure.PropertyName.UnitType, "" );

                UnitMgr.finalize( UseView: true );

            }
            {
                CswNbtSchemaUpdateImportMgr UnitMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "units_of_measure", ViewName : "volume_view", SourceColumn : "unitofmeasureid", DestNodeTypeName : "Unit_Volume" );

                UnitMgr.importBinding( "unitofmeasurename", CswNbtObjClassUnitOfMeasure.PropertyName.Name, "" );
                UnitMgr.importBinding( "conversionfactor", CswNbtObjClassUnitOfMeasure.PropertyName.ConversionFactor, "" );
                UnitMgr.importBinding( "unittype", CswNbtObjClassUnitOfMeasure.PropertyName.UnitType, "" );

                UnitMgr.finalize( UseView : true );

            }
            {
                CswNbtSchemaUpdateImportMgr UnitMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "units_of_measure", ViewName : "weight_view", SourceColumn : "unitofmeasureid", DestNodeTypeName : "Unit_Weight" );

                UnitMgr.importBinding( "unitofmeasurename", CswNbtObjClassUnitOfMeasure.PropertyName.Name, "" );
                UnitMgr.importBinding( "conversionfactor", CswNbtObjClassUnitOfMeasure.PropertyName.ConversionFactor, "" );
                UnitMgr.importBinding( "unittype", CswNbtObjClassUnitOfMeasure.PropertyName.UnitType, "" );

                UnitMgr.finalize( UseView : true );

            }

        } // update()
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.importBinding("flash_point", CswNbtObjClassChemical.PropertyName.FlashPoint, "", DestNodeTypeName: "Chemical");
            ImpMgr.importBinding("materialid", CswNbtObjClassChemical.PropertyName.LegacyMaterialId, "", DestNodeTypeName: "Chemical");
            ImpMgr.importBinding("productdescription", CswNbtObjClassChemical.PropertyName.ProductDescription, "", DestNodeTypeName: "Chemical");

            ImpMgr.finalize();
        }
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.importBinding("classes", CswNbtObjClassChemical.PropertyName.HazardClasses, "", DestNodeTypeName: "Chemical");
            ImpMgr.importBinding("categories", CswNbtObjClassChemical.PropertyName.HazardCategories, "", DestNodeTypeName: "Chemical");
            ImpMgr.importBinding("chemtype", CswNbtObjClassChemical.PropertyName.MaterialType, "", DestNodeTypeName: "Chemical");
            ImpMgr.importBinding("special_flags", CswNbtObjClassChemical.PropertyName.SpecialFlags, "", DestNodeTypeName: "Chemical");

            ImpMgr.finalize();
        }
示例#8
0
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            //RegList CAS No
            ImpMgr.importBinding("regulatorylistid", CswNbtObjClassRegulatoryListCasNo.PropertyName.RegulatoryList, CswEnumNbtSubFieldName.NodeID.ToString(), DestNodeTypeName: "Regulatory List CAS");

            //RegList
            ImpMgr.importBinding("reglistcode", CswNbtObjClassRegulatoryList.PropertyName.ListCode, "", DestNodeTypeName: "Regulatory List");

            ImpMgr.finalize();
        }
示例#9
0
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );
            ImpMgr.CAFimportOrder( "Regulatory List", "regulatory_lists", "reglists_view", "regulatorylistid" );
            ImpMgr.importBinding( "displayname", CswNbtObjClassRegulatoryList.PropertyName.Name, "" );
            ImpMgr.importBinding( "listmode", CswNbtObjClassRegulatoryList.PropertyName.ListMode, "" );


            ImpMgr.CAFimportOrder( "Regulatory List CAS", "regulated_casnos", PkColumnName : "regulatedcasnoid" );
            ImpMgr.importBinding( "casno", CswNbtObjClassRegulatoryListCasNo.PropertyName.CASNo, "" );

            ImpMgr.finalize();

        } // update()
 public override void doUpdate()
 {
     CswNbtSchemaUpdateImportMgr sizeImporter = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );
     sizeImporter.removeImportBinding( "CAF", "upc", "Size", "UPC Barcode", CswEnumNbtSubFieldName.Barcode.ToString() );
     sizeImporter.importBinding( "upc", CswNbtObjClassSize.PropertyName.UPC, "", DestNodeTypeName: "Size" );
     sizeImporter.finalize();
 } // update()
示例#11
0
        public override void doUpdate()
        {
            // Case 30043 - CAF Migration: Sites/Locations/Work Units

            // View creation script
            //select w.*, s.sitename || ' ' || b.businessunitname as workunitname from work_units w
            //left outer join business_units b on (b.businessunitid = w.businessunitid)
            //left outer join sites s on (s.siteid = w.siteid)

            CswNbtSchemaUpdateImportMgr importMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

            importMgr.CAFimportOrder( "Work Unit", "work_units", "workunits_view", "workunitid" );
            // Binding
            importMgr.importBinding( "workunitname", CswNbtObjClassWorkUnit.PropertyName.Name, "" );

            // Relationship
            //none

            importMgr.finalize();

            // Columns in work_units table
            //deleted
            //retestwarndays
            //workunitid
            //siteid
            //businessunitid
            //stdapprovalmode
            //skiplotcodedefault
            //expiryinterval
            //retestintervaldefault
            //messagetext
            //expiryintervalunits
            //retaincount
            //retainkeepyears
            //retainquantity
            //retainunitofmeasureid
            //mininventorylevel
            //mininventoryunitofmeasureid
            //homeinventorygroupid
            //stdexpiryinterval
            //stdexpiryintervalunits
            //autolotapproval
            //samplecollectionrequired
            //dispense_percent
            //canorderdraft
            //canoverreq
            //cansynchcontainers
            //srireviewgroupid
            //def_reqaschild
            //amountenable
            //alloc1
            //alloc2
            //alloc3
            //alloc4
            //alloc5
            //removegroupondispense
            //removegrouponmove

        } // update()
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.importBinding("manufacturerlotno", CswNbtObjClassReceiptLot.PropertyName.ManufacturerLotNo, "", DestNodeTypeName: "Receipt Lot");

            ImpMgr.finalize();
        }
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.importBinding("country", CswNbtObjClassVendor.PropertyName.Country, "", DestNodeTypeName: "Vendor");

            ImpMgr.finalize();
        }
示例#14
0
        public override void update()
        {
            bool DefinitionExists = CswNbtImportDef.checkForDefinitionEntries( _CswNbtSchemaModTrnsctn, CswScheduleLogicNbtCAFImport.DefinitionName );
            if( DefinitionExists )
            {
            // CAF bindings definitions for Biologicals
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );
            ImpMgr.CAFimportOrder( "Constituent", "materials", "constituents_view", "legacyid" );

            //Simple Props
            ImpMgr.importBinding( "name", CswNbtObjClassChemical.PropertyName.TradeName, "" );
            ImpMgr.importBinding( "casno", CswNbtObjClassChemical.PropertyName.CasNo, "" );
            ImpMgr.importBinding( "einecs", CswNbtObjClassChemical.PropertyName.EINECS, "" );

            ImpMgr.finalize();
            }
        } // update()
        public override void update()
        {
            bool DefinitionExists = CswNbtImportDef.checkForDefinitionEntries( _CswNbtSchemaModTrnsctn, CswScheduleLogicNbtCAFImport.DefinitionName );
            if( DefinitionExists )
            {
            // CAF bindings definitions for Supplies
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );
            ImpMgr.CAFimportOrder( "Supply", "packages", "supplies_view", "packageid" );

            //Simple Props
            ImpMgr.importBinding( "materialid", CswNbtPropertySetMaterial.PropertyName.LegacyMaterialId, "" );
            ImpMgr.importBinding( "productdescription", "Description", "" );
            ImpMgr.importBinding( "materialname", CswNbtPropertySetMaterial.PropertyName.TradeName, "" );
            ImpMgr.importBinding( "productno", CswNbtPropertySetMaterial.PropertyName.PartNumber, "" );
            ImpMgr.importBinding( "approved_trans", CswNbtPropertySetMaterial.PropertyName.ApprovedForReceiving, "" );

            //Relationships
            ImpMgr.importBinding( "vendorid", CswNbtPropertySetMaterial.PropertyName.Supplier, CswEnumNbtSubFieldName.NodeID.ToString() );

            //LOBs
            ImpMgr.importBinding( "struct_pict", CswNbtObjClassNonChemical.PropertyName.Picture, CswEnumNbtSubFieldName.Blob.ToString(), BlobTableName: "materials", LobDataPkColOverride: "materialid" );

            ImpMgr.finalize();
            }
        } // update()
示例#16
0
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.removeImportBinding("CAF", "CA_FileExtension", "C of A Document", "File Type", "Value");
            ImpMgr.importBinding("FileExtension", CswNbtObjClassCofADocument.PropertyName.FileType, "", "CAF", "C of A Document");

            ImpMgr.finalize();
        }
        public override void doUpdate()
        {
            // Case 30043 - CAF Migration: Sites/Locations/Work Units
            CswNbtSchemaUpdateImportMgr ImportMgr_ControlZones = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );


            ImportMgr_ControlZones.CAFimportOrder( "Control Zone", "cispro_controlzones", PkColumnName: "controlzoneid" );

            // Binding
            ImportMgr_ControlZones.importBinding( "controlzonename", CswNbtObjClassControlZone.PropertyName.Name, "" );
            ImportMgr_ControlZones.importBinding( "exemptqtyfactor", CswNbtObjClassControlZone.PropertyName.MAQOffset, "" );

            // Relationship
            //none

            ImportMgr_ControlZones.finalize();

        } // update()
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            //RegList CAS No
            ImpMgr.importBinding("approved_trans", CswNbtObjClassChemical.PropertyName.ApprovedForReceiving, "", DestNodeTypeName: "Chemical");

            ImpMgr.finalize();
        }
        public override void doUpdate()
        {
            // CAF bindings definitions for Vendors
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

            ImpMgr.CAFimportOrder("Material Synonym", "materials_synonyms", "synonyms_view", "legacyid", false);

            //simple props
            ImpMgr.importBinding("synonymname", CswNbtObjClassMaterialSynonym.PropertyName.Name, "");
            ImpMgr.importBinding("synonymclass", CswNbtObjClassMaterialSynonym.PropertyName.Type, "");

            //relationships
            ImpMgr.importBinding("packageid", CswNbtObjClassMaterialSynonym.PropertyName.Material, CswEnumNbtSubFieldName.NodeID.ToString());

            //Legacy Id for Synonyms is "<SynonymId>_<PackageId>" (ex: "123_343")
            ImpMgr.importBinding("legacyid", "Legacy Id", "");

            ImpMgr.finalize();
        }
        public override void update()
        {
            if( CswNbtImportDef.checkForDefinitionEntries( _CswNbtSchemaModTrnsctn, "CAF" ) )
            {
                CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

                ImpMgr.removeImportBinding( "CAF", "controlzonename", "Control Zone", "Name", "Text" );
                ImpMgr.importBinding( "controlzonename", CswNbtObjClassControlZone.PropertyName.ControlZoneName, "", "CAF", "Control Zone" );

                ImpMgr.finalize();
            }
        } // update()
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr RoleMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

            RoleMgr.removeImportOrder( "CAF", "Role" );
            RoleMgr.CAFimportOrder( "Role", "roles", "roles_view", "roleid" );

            RoleMgr.importBinding( "administrator", CswNbtObjClassRole.PropertyName.Administrator, "" );

            RoleMgr.finalize();

        } // update()
示例#22
0
        public override void update()
        {
            bool DefinitionExists = CswNbtImportDef.checkForDefinitionEntries( _CswNbtSchemaModTrnsctn, CswScheduleLogicNbtCAFImport.DefinitionName );
            if( DefinitionExists )
            {
            // CAF bindings definitions for Biologicals
            CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );
            ImpMgr.CAFimportOrder( "Material Component", "component_casnos", "materialcomps_view", "legacyid" );

            //Simple Props
            ImpMgr.importBinding( "quantity", CswNbtObjClassMaterialComponent.PropertyName.TargetPercentageValue, "" );
            ImpMgr.importBinding( "quantity", CswNbtObjClassMaterialComponent.PropertyName.HighPercentageValue, "" );

            //Relationships
            ImpMgr.importBinding( "packageid", CswNbtObjClassMaterialComponent.PropertyName.Mixture, CswEnumNbtSubFieldName.NodeID.ToString() );
            ImpMgr.importBinding( "constituentid", CswNbtObjClassMaterialComponent.PropertyName.Constituent, CswEnumNbtSubFieldName.NodeID.ToString() );

            ImpMgr.finalize();
            }

        } // update()
示例#23
0
        public override void update()
        {
            if (CswNbtImportDef.checkForDefinitionEntries(_CswNbtSchemaModTrnsctn, "CAF"))
            {
                CswNbtSchemaUpdateImportMgr ImpMgr = new CswNbtSchemaUpdateImportMgr(_CswNbtSchemaModTrnsctn, "CAF");

                ImpMgr.CAFimportOrder("Equipment Type", "materials_subclass", "equipment_type_view", "materialsubclassid");

                //Simple props
                ImpMgr.importBinding("subclassname", CswNbtObjClassEquipmentType.PropertyName.TypeName, "");

                ImpMgr.finalize();
            }
        }
示例#24
0
        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 doUpdate()
        {
            // Case 30043 - CAF Migration: Sites/Locations/Work Units
            CswNbtSchemaUpdateImportMgr importMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

            importMgr.CAFimportOrder( "Inventory Group", "inventory_groups", PkColumnName: "inventorygroupid" );
            // Binding
            importMgr.importBinding( "inventorygroupname", CswNbtObjClassInventoryGroup.PropertyName.Name, "" );
            importMgr.importBinding( "iscentralgroup", CswNbtObjClassInventoryGroup.PropertyName.Central, "" );

            // Relationship
            //none

            importMgr.finalize();

            //Columns in inventory_groups table
            //deleted
            //inventorygroupid
            //inventorygroupname
            //iscentralgroup
            //workunitid
            //inventorygroupcode

        } // update()
示例#26
0
        } // update()


        #region import script

        private void _createImportBindings()
        {
            CswNbtSchemaUpdateImportMgr sizeImporter = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

            sizeImporter.CAFimportOrder( "Size", "packdetail", "packdetail_view", "packdetailid" );

            sizeImporter.importBinding( "packagedescription", CswNbtObjClassSize.PropertyName.Description, "" );
            sizeImporter.importBinding( "packageid", CswNbtObjClassSize.PropertyName.Material, CswEnumNbtSubFieldName.NodeID.ToString() );
            sizeImporter.importBinding( "catalogno", CswNbtObjClassSize.PropertyName.CatalogNo, "" );
            sizeImporter.importBinding( "capacity", CswNbtObjClassSize.PropertyName.InitialQuantity, CswEnumNbtSubFieldName.Value.ToString() );
            sizeImporter.importBinding( "unitofmeasureid", CswNbtObjClassSize.PropertyName.InitialQuantity, CswEnumNbtSubFieldName.NodeID.ToString() );
            //sizeImporter.importBinding( "upc", "UPC Barcode", "" );//Case 31264 invalidates this binding
            sizeImporter.importBinding( "containertype", CswNbtObjClassSize.PropertyName.ContainerType, "" );

            sizeImporter.finalize();
        }
        public override void doUpdate()
        {
            CswNbtSchemaUpdateImportMgr InventoryLevelBindings =
                new CswNbtSchemaUpdateImportMgr(
                    _CswNbtSchemaModTrnsctn,
                    "CAF" );

            InventoryLevelBindings.CAFimportOrder( "Inventory Level", "mininventory_basic", "inventory_view", "inventorybasicid" ); //SPECIAL CASE: maxinventory_basic is also in the view

            InventoryLevelBindings.importBinding( "inventorybasicid", CswNbtObjClassInventoryLevel.PropertyName.LegacyId, "" );
            InventoryLevelBindings.importBinding( "inventorylevel", CswNbtObjClassInventoryLevel.PropertyName.Level, CswEnumNbtSubFieldName.Value.ToString() );
            InventoryLevelBindings.importBinding( "unitofmeasureid", CswNbtObjClassInventoryLevel.PropertyName.Level, CswEnumNbtSubFieldName.NodeID.ToString() );
            InventoryLevelBindings.importBinding( "locationid", CswNbtObjClassInventoryLevel.PropertyName.Location, CswEnumNbtSubFieldName.NodeID.ToString() );
            InventoryLevelBindings.importBinding( "packageid", CswNbtObjClassInventoryLevel.PropertyName.Material, CswEnumNbtSubFieldName.NodeID.ToString() );
            InventoryLevelBindings.importBinding( "inventorytype", CswNbtObjClassInventoryLevel.PropertyName.Type, CswEnumNbtSubFieldName.Value.ToString() );

            InventoryLevelBindings.finalize();
        }
示例#28
0
        public override void doUpdate()
        {
            // Case 30043 - CAF Migration: Sites/Locations/Work Units

            CswNbtSchemaUpdateImportMgr LocationsMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

            // Bindings

            LocationsMgr.removeImportOrder( "CAF", "Site", 1, true );
            LocationsMgr.removeImportOrder( "CAF", "Building", 2, true );
            LocationsMgr.removeImportOrder( "CAF", "Room", 3, true );
            LocationsMgr.removeImportOrder( "CAF", "Cabinet", 4, true );
            LocationsMgr.removeImportOrder( "CAF", "Shelf", 5, true );
            LocationsMgr.removeImportOrder( "CAF", "Box", 6, true );

            //the instance on the relationships is different for Locations, so they must be deleted manually
            LocationsMgr.removeImportRelationship( "CAF", "Building", "Location", 1 );
            LocationsMgr.removeImportRelationship( "CAF", "Room", "Location", 2 );
            LocationsMgr.removeImportRelationship( "CAF", "Cabinet", "Location", 3 );
            LocationsMgr.removeImportRelationship( "CAF", "Shelf", "Location", 4 );
            LocationsMgr.removeImportRelationship( "CAF", "Box", "Location", 5 );


            #region Site

            LocationsMgr.CAFimportOrder( "Site", "sites", "site_view", "siteid" );
            LocationsMgr.importBinding( "sitename", CswNbtObjClassLocation.PropertyName.Name, "" );
            LocationsMgr.importBinding( "sitecode", CswNbtObjClassLocation.PropertyName.LocationCode, "" );
            LocationsMgr.importBinding( "barcode", CswNbtObjClassLocation.PropertyName.Barcode, "" );
            #endregion

            #region Building
            LocationsMgr.CAFimportOrder( "Building", "locations", "building_view", "locationid" );

            LocationsMgr.importBinding( "locationlevel1name", CswNbtObjClassLocation.PropertyName.Name, "");
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "");
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString());
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "" );
            LocationsMgr.importBinding( "barcode", CswNbtObjClassLocation.PropertyName.Barcode, "" );
            LocationsMgr.importBinding( "siteid", CswNbtObjClassLocation.PropertyName.Location, CswEnumNbtSubFieldName.NodeID.ToString() );

            #endregion

            #region Room
            LocationsMgr.CAFimportOrder( "Room", "locations", "room_view", "locationid" );

            LocationsMgr.importBinding( "locationlevel2name", CswNbtObjClassLocation.PropertyName.Name, "" );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "" );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "" );
            LocationsMgr.importBinding( "barcode", CswNbtObjClassLocation.PropertyName.Barcode, "" );
            LocationsMgr.importBinding( "buildingid", CswNbtObjClassLocation.PropertyName.Location, CswEnumNbtSubFieldName.NodeID.ToString() );

            #endregion

            #region Cabinet
            LocationsMgr.CAFimportOrder( "Cabinet", "locations", "cabinet_view", "locationid" );

            LocationsMgr.importBinding( "locationlevel3name", CswNbtObjClassLocation.PropertyName.Name, "" );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "" );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "" );
            LocationsMgr.importBinding( "barcode", CswNbtObjClassLocation.PropertyName.Barcode, "" );
            LocationsMgr.importBinding( "roomid", CswNbtObjClassLocation.PropertyName.Location, CswEnumNbtSubFieldName.NodeID.ToString() );

            #endregion

            #region Shelf
            LocationsMgr.CAFimportOrder( "Shelf", "locations", "shelf_view", "locationid" );

            LocationsMgr.importBinding( "locationlevel4name", CswNbtObjClassLocation.PropertyName.Name, "" );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "" );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "" );
            LocationsMgr.importBinding( "barcode", CswNbtObjClassLocation.PropertyName.Barcode, "" );
            LocationsMgr.importBinding( "cabinetid", CswNbtObjClassLocation.PropertyName.Location, CswEnumNbtSubFieldName.NodeID.ToString() );

            #endregion

            #region Box
            LocationsMgr.CAFimportOrder( "Box", "locations", "box_view", "locationid" );

            LocationsMgr.importBinding( "locationlevel5name", CswNbtObjClassLocation.PropertyName.Name, "" );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "" );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString() );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "" );
            LocationsMgr.importBinding( "barcode", CswNbtObjClassLocation.PropertyName.Barcode, "" );
            LocationsMgr.importBinding( "shelfid", CswNbtObjClassLocation.PropertyName.Location, CswEnumNbtSubFieldName.NodeID.ToString() );

            #endregion


                                             
                                             
                                             

            LocationsMgr.finalize();

        } // update()
示例#29
0
        public override void doUpdate()
        {
            // Case 30043 - CAF Migration: Sites/Locations/Work Units
            const string SiteNTName = "Site";
            const string BuildingNTName = "Building";
            const string RoomNTName = "Room";
            const string CabinetNTName = "Cabinet";
            const string ShelfNTName = "Shelf";
            const string BoxNTName = "Box";
            const string LocationSheetName = "CAF";


            CswNbtSchemaUpdateImportMgr LocationsMgr = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CAF" );

            // Bindings

            #region Site
            LocationsMgr.CAFimportOrder( SiteNTName, "locations", "locations_view", "locationid", false, 1 );
            LocationsMgr.importBinding( "sitename", CswNbtObjClassLocation.PropertyName.Name, "", LocationSheetName, SiteNTName, 1 );
            LocationsMgr.importBinding( "sitecode", CswNbtObjClassLocation.PropertyName.LocationCode, "", LocationSheetName, SiteNTName, 1 );
            LocationsMgr.importBinding( "siteid", "Legacy Id", "", LocationSheetName, SiteNTName, 1 );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, SiteNTName, 1 );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "", LocationSheetName, SiteNTName, 1 );
            #endregion

            #region Building
            LocationsMgr.CAFimportOrder( BuildingNTName, "locations", "locations_view", "locationid", false, 2 );

            LocationsMgr.importBinding( "locationlevel1name", CswNbtObjClassLocation.PropertyName.Name, "", LocationSheetName, BuildingNTName, 2 );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "", LocationSheetName, BuildingNTName, 2 );
            LocationsMgr.importBinding( "buildingid", "Legacy Id", "", LocationSheetName, BuildingNTName, 2 );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, BuildingNTName, 2 );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, BuildingNTName, 2 );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "", LocationSheetName, BuildingNTName, 2 );
            #endregion

            #region Room
            LocationsMgr.CAFimportOrder( RoomNTName, "locations", "locations_view", "locationid", false, 3 );

            LocationsMgr.importBinding( "locationlevel2name", CswNbtObjClassLocation.PropertyName.Name, "", LocationSheetName, RoomNTName, 3 );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "", LocationSheetName, RoomNTName, 3 );
            LocationsMgr.importBinding( "roomid", "Legacy Id", "", LocationSheetName, RoomNTName, 3 );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, RoomNTName, 3 );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, RoomNTName, 3 );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "", LocationSheetName, RoomNTName, 3 );
            #endregion

            #region Cabinet
            LocationsMgr.CAFimportOrder( CabinetNTName, "locations", "locations_view", "locationid", false, 4 );

            LocationsMgr.importBinding( "locationlevel3name", CswNbtObjClassLocation.PropertyName.Name, "", LocationSheetName, CabinetNTName, 4 );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "", LocationSheetName, CabinetNTName, 4 );
            LocationsMgr.importBinding( "cabinetid", "Legacy Id", "", LocationSheetName, CabinetNTName, 4 );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, CabinetNTName, 4 );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, CabinetNTName, 4 );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "", LocationSheetName, CabinetNTName, 4 );
            #endregion

            #region Shelf
            LocationsMgr.CAFimportOrder( ShelfNTName, "locations", "locations_view", "locationid", false, 5 );

            LocationsMgr.importBinding( "locationlevel4name", CswNbtObjClassLocation.PropertyName.Name, "", LocationSheetName, ShelfNTName, 5 );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "", LocationSheetName, ShelfNTName, 5 );
            LocationsMgr.importBinding( "shelfid", "Legacy Id", "", LocationSheetName, ShelfNTName, 5 );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, ShelfNTName, 5 );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, ShelfNTName, 5 );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "", LocationSheetName, ShelfNTName, 5 );
            #endregion

            #region Box
            LocationsMgr.CAFimportOrder( BoxNTName, "locations", "locations_view", "locationid", false, 6 );

            LocationsMgr.importBinding( "locationlevel5name", CswNbtObjClassLocation.PropertyName.Name, "", LocationSheetName, BoxNTName, 6 );
            LocationsMgr.importBinding( "locationcode", CswNbtObjClassLocation.PropertyName.LocationCode, "", LocationSheetName, BoxNTName, 6 );
            LocationsMgr.importBinding( "boxid", "Legacy Id", "", LocationSheetName, BoxNTName, 6 );
            LocationsMgr.importBinding( "inventorygroupid", CswNbtObjClassLocation.PropertyName.InventoryGroup, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, BoxNTName, 6 );
            LocationsMgr.importBinding( "controlzoneid", CswNbtObjClassLocation.PropertyName.ControlZone, CswEnumNbtSubFieldName.NodeID.ToString(), LocationSheetName, BoxNTName, 6 );
            LocationsMgr.importBinding( "allowinventory", CswNbtObjClassLocation.PropertyName.AllowInventory, "", LocationSheetName, BoxNTName, 6 );
            #endregion

            //Relationships
            LocationsMgr.importRelationship( LocationSheetName, BuildingNTName, CswNbtObjClassLocation.PropertyName.Location, 1, "siteid" );

            LocationsMgr.importRelationship( LocationSheetName, RoomNTName, CswNbtObjClassLocation.PropertyName.Location, 2, "buildingid" );

            LocationsMgr.importRelationship( LocationSheetName, CabinetNTName, CswNbtObjClassLocation.PropertyName.Location, 3, "roomid" );

            LocationsMgr.importRelationship( LocationSheetName, ShelfNTName, CswNbtObjClassLocation.PropertyName.Location, 4, "cabinetid" );

            LocationsMgr.importRelationship( LocationSheetName, BoxNTName, CswNbtObjClassLocation.PropertyName.Location, 5, "shelfid" );

            LocationsMgr.finalize();

        } // update()
        public override void update()
        {
            // CISPro
            if ( _CswNbtSchemaModTrnsctn.isMaster() ){
                CswNbtMetaDataNodeType SiteNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Site" );
                
                CswNbtSchemaUpdateImportMgr ImpMgrCIS = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "CISPro" );

                ImpMgrCIS.importDef( 1, "chemicals" );

                ImpMgrCIS.importOrder( 1, "Inventory Group", "chemicals" );
                ImpMgrCIS.importOrder( 2, "Department", "chemicals" );
                if( null != SiteNT ) // case 31306
                {
                    ImpMgrCIS.importOrder( 3, "Site", "chemicals", 1 );
                }
                ImpMgrCIS.importOrder( 4, "Building", "chemicals", 2 );
                ImpMgrCIS.importOrder( 5, "Room", "chemicals", 3 );
                ImpMgrCIS.importOrder( 6, "Cabinet", "chemicals", 4 );
                ImpMgrCIS.importOrder( 7, "Vendor", "chemicals" );
                ImpMgrCIS.importOrder( 8, "Chemical", "chemicals" );
                ImpMgrCIS.importOrder( 9, "Unit_Weight", "chemicals" );
                ImpMgrCIS.importOrder( 10, "Unit_Volume", "chemicals" );
                ImpMgrCIS.importOrder( 11, "Unit_Each", "chemicals" );
                ImpMgrCIS.importOrder( 12, "Role", "chemicals" );
                ImpMgrCIS.importOrder( 13, "User", "chemicals" );
                ImpMgrCIS.importOrder( 14, "Size", "chemicals" );
                ImpMgrCIS.importOrder( 15, "Container", "chemicals" );

                ImpMgrCIS.importBinding( "inventorygroupname", "Name", "", "chemicals", "inventory group" );
                ImpMgrCIS.importBinding( "department", "Department Name", "", "chemicals", "department" );
                if( null != SiteNT ) // case 31306
                {
                    ImpMgrCIS.importBinding( "site", "Name", "", "chemicals", "site", 1 );
                }
                ImpMgrCIS.importBinding( "building", "Name", "", "chemicals", "building", 2 );
                ImpMgrCIS.importBinding( "room", "Name", "", "chemicals", "room", 3 );
                ImpMgrCIS.importBinding( "cabinet", "Name", "", "chemicals", "cabinet", 4 );
                ImpMgrCIS.importBinding( "vendorname", "Vendor Name", "", "chemicals", "vendor" );
                ImpMgrCIS.importBinding( "materialname", "Tradename", "", "chemicals", "chemical" );
                ImpMgrCIS.importBinding( "catalogno", "Part Number", "", "chemicals", "chemical" );
                ImpMgrCIS.importBinding( "casno", "CAS No", "", "chemicals", "chemical" );
                ImpMgrCIS.importBinding( "Unit_Weight", "Name", "", "chemicals", "Unit_Weight" );
                ImpMgrCIS.importBinding( "Unit_Volume", "Name", "", "chemicals", "Unit_Volume" );
                ImpMgrCIS.importBinding( "Unit_Each", "Name", "", "chemicals", "Unit_Each" );
                ImpMgrCIS.importBinding( "ConvFactExp", "Conversion Factor", "exponent", "chemicals", "Unit_Weight" );
                ImpMgrCIS.importBinding( "ConvFactExp", "Conversion Factor", "exponent", "chemicals", "Unit_Volume" );
                ImpMgrCIS.importBinding( "ConvFactExp", "Conversion Factor", "exponent", "chemicals", "Unit_Each" );
                ImpMgrCIS.importBinding( "ConvFactBase", "Conversion Factor", "base", "chemicals", "Unit_Weight" );
                ImpMgrCIS.importBinding( "ConvFactBase", "Conversion Factor", "base", "chemicals", "Unit_Volume" );
                ImpMgrCIS.importBinding( "ConvFactBase", "Conversion Factor", "base", "chemicals", "Unit_Each" );
                ImpMgrCIS.importBinding( "UnitOfMeasureName", "Quantity", "name", "chemicals", "container" );
                ImpMgrCIS.importBinding( "netquantity", "Quantity", "value", "chemicals", "container" );
                ImpMgrCIS.importBinding( "UnitOfMeasureName", "Initial Quantity", "name", "chemicals", "size" );
                ImpMgrCIS.importBinding( "barcodeid", "Barcode", "", "chemicals", "container" );
                ImpMgrCIS.importBinding( "responsible", "Username", "", "chemicals", "user" );
                ImpMgrCIS.importBinding( "expirationdate", "expiration date", "", "chemicals", "container" );
                ImpMgrCIS.importBinding( "rolename", "Name", "", "chemicals", "role" );

                ImpMgrCIS.importRelationship( "chemicals", "Building", "Location", 1 );
                ImpMgrCIS.importRelationship( "chemicals", "Room", "Location", 2 );
                ImpMgrCIS.importRelationship( "chemicals", "Room", "Department" );
                ImpMgrCIS.importRelationship( "chemicals", "Cabinet", "Location", 3 );
                ImpMgrCIS.importRelationship( "chemicals", "Chemical", "Supplier" );
                ImpMgrCIS.importRelationship( "chemicals", "Size", "Material" );
                ImpMgrCIS.importRelationship( "chemicals", "Container", "Size" );
                ImpMgrCIS.importRelationship( "chemicals", "Container", "Material" );
                ImpMgrCIS.importRelationship( "chemicals", "Container", "Location", 1 );
                ImpMgrCIS.importRelationship( "chemicals", "Container", "Location", 2 );
                ImpMgrCIS.importRelationship( "chemicals", "Container", "Location", 3 );
                ImpMgrCIS.importRelationship( "chemicals", "Container", "Location", 4 );
                ImpMgrCIS.importRelationship( "chemicals", "Container", "Owner" );
                if( null != SiteNT ) // case 31306
                {
                    ImpMgrCIS.importRelationship( "chemicals", "Site", "Inventory Group" );
                }
                ImpMgrCIS.importRelationship( "chemicals", "Room", "Inventory Group" );
                ImpMgrCIS.importRelationship( "chemicals", "Building", "Inventory Group" );
                ImpMgrCIS.importRelationship( "chemicals", "Cabinet", "Inventory Group" );
                ImpMgrCIS.importRelationship( "chemicals", "User", "Role" );

                ImpMgrCIS.finalize();
            }

            //// SI
            //{
            //    CswNbtSchemaUpdateImportMgr ImpMgrSI = new CswNbtSchemaUpdateImportMgr( _CswNbtSchemaModTrnsctn, "SI" );

            //    ImpMgrSI.importDef( 1, "InspectionTarget" );

            //    ImpMgrSI.importOrder( 1, "Site", "InspectionTarget", 1 );
            //    ImpMgrSI.importOrder( 2, "Building", "InspectionTarget", 2 );
            //    ImpMgrSI.importOrder( 3, "Room", "InspectionTarget", 3 );
            //    ImpMgrSI.importOrder( 4, "InspectionTarget Group", "InspectionTarget" );
            //    ImpMgrSI.importOrder( 5, "InspectionTarget", "InspectionTarget" );
            //    ImpMgrSI.importOrder( 6, "Inspection Schedule", "InspectionTarget" );

            //    ImpMgrSI.importBinding( "site", "Name", "", "InspectionTarget", "site", 1 );
            //    ImpMgrSI.importBinding( "building", "Name", "", "InspectionTarget", "building", 2 );
            //    ImpMgrSI.importBinding( "room", "Name", "", "InspectionTarget", "room", 3 );
            //    ImpMgrSI.importBinding( "inspectiongroup", "Name", "", "InspectionTarget", "inspectiontarget group" );
            //    ImpMgrSI.importBinding( "UniqueTargetName", "Description", "", "InspectionTarget", "inspectiontarget" );
            //    ImpMgrSI.importBinding( "schedule_summary", "Summary", "", "InspectionTarget", "Inspection Schedule" );
            //    ImpMgrSI.importBinding( "checklist name", "Inspection Type", "", "InspectionTarget", "Inspection Schedule" );
            //    ImpMgrSI.importBinding( "Next Due Date", "Next Due Date", "", "InspectionTarget", "Inspection Schedule" );
            //    ImpMgrSI.importBinding( "DueDateInterval", "Due Date Interval", "", "InspectionTarget", "Inspection Schedule" );
            //    ImpMgrSI.importBinding( "WarningDays", "Warning Days", "", "InspectionTarget", "Inspection Schedule" );

            //    ImpMgrSI.importRelationship( "InspectionTarget", "InspectionTarget", "Location", 3 );
            //    ImpMgrSI.importRelationship( "InspectionTarget", "InspectionTarget", "Location", 2 );
            //    ImpMgrSI.importRelationship( "InspectionTarget", "InspectionTarget", "Location", 1 );
            //    ImpMgrSI.importRelationship( "InspectionTarget", "InspectionTarget", "InspectionTarget Group" );
            //    ImpMgrSI.importRelationship( "InspectionTarget", "Inspection Schedule", "Inspection Group" );
            //    ImpMgrSI.importRelationship( "InspectionTarget", "Building", "Location", 1 );
            //    ImpMgrSI.importRelationship( "InspectionTarget", "Room", "Location", 2 );

            //    ImpMgrSI.finalize();
            //}
        } // update()