protected override void OnDisable()
        {
            //Hide the following ReceiptLot properties...
            //   Manufacturer
            //   Manufacturer Lot No
            //   Manufactured Date
            //   Assigned CofA
            //   View CofA
            CswNbtMetaDataObjectClass ReceiptLotOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.ReceiptLotClass);

            foreach (int ReceiptLotId in ReceiptLotOC.getNodeTypeIds().Keys)
            {
                _CswNbtResources.Modules.HideProp(ReceiptLotId, CswNbtObjClassReceiptLot.PropertyName.Manufacturer);
                _CswNbtResources.Modules.HideProp(ReceiptLotId, CswNbtObjClassReceiptLot.PropertyName.ManufacturerLotNo);
                _CswNbtResources.Modules.HideProp(ReceiptLotId, CswNbtObjClassReceiptLot.PropertyName.ManufacturedDate);
                _CswNbtResources.Modules.HideProp(ReceiptLotId, CswNbtObjClassReceiptLot.PropertyName.AssignedCofA);
                _CswNbtResources.Modules.HideProp(ReceiptLotId, CswNbtObjClassReceiptLot.PropertyName.ViewCofA);
            }

            //Hide the following Container properties...
            //   View CofA
            CswNbtMetaDataObjectClass ContainerOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.ContainerClass);

            foreach (int ContainerNTId in ContainerOC.getNodeTypeIds().Keys)
            {
                _CswNbtResources.Modules.HideProp(ContainerNTId, CswNbtObjClassContainer.PropertyName.ViewCofA);
            }

            CswNbtModuleRuleMLM.setReceiptLotPermissions(_CswNbtResources, false);
        } // OnDisable()
        protected override void OnEnable()
        {
            //Show the following ReceiptLot properties...
            //   Manufacturer
            //   Manufacturer Lot No
            //   Manufactured Date
            //   Assigned CofA
            //   View CofA
            CswNbtMetaDataObjectClass ReceiptLotOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.ReceiptLotClass);

            foreach (CswNbtMetaDataNodeType ReceiptLotNT in ReceiptLotOC.getNodeTypes())
            {
                _CswNbtResources.Modules.ShowProp(ReceiptLotNT.NodeTypeId, CswNbtObjClassReceiptLot.PropertyName.Manufacturer);
                _CswNbtResources.Modules.ShowProp(ReceiptLotNT.NodeTypeId, CswNbtObjClassReceiptLot.PropertyName.ManufacturerLotNo);
                _CswNbtResources.Modules.ShowProp(ReceiptLotNT.NodeTypeId, CswNbtObjClassReceiptLot.PropertyName.ManufacturedDate);
                _CswNbtResources.Modules.ShowProp(ReceiptLotNT.NodeTypeId, CswNbtObjClassReceiptLot.PropertyName.AssignedCofA);
                _CswNbtResources.Modules.ShowProp(ReceiptLotNT.NodeTypeId, CswNbtObjClassReceiptLot.PropertyName.ViewCofA);
            }

            //Show the following Container properties...
            //   View CofA
            CswNbtMetaDataObjectClass ContainerOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.ContainerClass);

            foreach (CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes())
            {
                _CswNbtResources.Modules.ShowProp(ContainerNT.NodeTypeId, CswNbtObjClassContainer.PropertyName.ViewCofA);
            }

            CswNbtModuleRuleMLM.setReceiptLotPermissions(_CswNbtResources, true);
        }
Exemplo n.º 3
0
        public static CswNbtModuleRule makeModuleRule(CswNbtResources CswNbtResources, CswEnumNbtModuleName ModuleName)
        {
            CswNbtModuleRule ret = null;

            if (CswEnumNbtModuleName.CISPro == ModuleName)
            {
                ret = new CswNbtModuleRuleCISPro(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.Dev == ModuleName)
            {
                ret = new CswNbtModuleRuleDev(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.DirectStructureSearch == ModuleName)
            {
                ret = new CswNbtModuleRuleDirectStructureSearch(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.IMCS == ModuleName)
            {
                ret = new CswNbtModuleRuleIMCS(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.MLM == ModuleName)
            {
                ret = new CswNbtModuleRuleMLM(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.NBTManager == ModuleName)
            {
                ret = new CswNbtModuleRuleNBTManager(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.SI == ModuleName)
            {
                ret = new CswNbtModuleRuleSI(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.C3 == ModuleName)
            {
                ret = new CswNbtModuleRuleC3(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.Containers == ModuleName)
            {
                ret = new CswNbtModuleRuleContainers(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.FireCode == ModuleName)
            {
                ret = new CswNbtModuleRuleFireCode(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.SDS == ModuleName)
            {
                ret = new CswNbtModuleRuleSDS(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.RegulatoryLists == ModuleName)
            {
                ret = new CswNbtModuleRuleRegulatoryLists(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.Requesting == ModuleName)
            {
                ret = new CswNbtModuleRuleRequesting(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.MultiSite == ModuleName)
            {
                ret = new CswNbtModuleRuleMultiSite(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.MultiInventoryGroup == ModuleName)
            {
                ret = new CswNbtModuleRuleMultiInventoryGroup(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.FireDbSync == ModuleName)
            {
                ret = new CswNbtModuleRuleFireDbSync(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.PCIDSync == ModuleName)
            {
                ret = new CswNbtModuleRulePCIDSync(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.ManufacturerLotInfo == ModuleName)
            {
                ret = new CswNbtModuleRuleManufacturerLotInfo(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.LOLISync == ModuleName)
            {
                ret = new CswNbtModuleRuleLOLISync(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.DSD == ModuleName)
            {
                ret = new CswNbtModuleRuleDSD(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.ChemWatch == ModuleName)
            {
                ret = new CswNbtModuleRuleChemWatch(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.ArielSync == ModuleName)
            {
                ret = new CswNbtModuleRuleArielSync(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.C3ACD == ModuleName)
            {
                ret = new CswNbtModuleRuleC3ACD(CswNbtResources);
            }
            else if (CswEnumNbtModuleName.C3Products == ModuleName)
            {
                ret = new CswNbtModuleRuleC3Products(CswNbtResources);
            }
            else
            {
                throw new CswDniException(CswEnumErrorType.Error,
                                          "Unhandled ModuleName: " + ModuleName.ToString(),
                                          "CswNbtModuleRuleFactory did not recognize module name: " + ModuleName.ToString());
            }
            return(ret);
        }