} // OnEnable()

        protected override void OnDisable()
        {
            CswNbtMetaDataObjectClass invGrpOC  = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.InventoryGroupClass);
            CswNbtActQuotas           QuotasAct = new CswNbtActQuotas(_CswNbtResources);
            CswNbtView invGrpView = new CswNbtView(_CswNbtResources);

            invGrpView.AddViewRelationship(invGrpOC, false);
            ICswNbtTree invGroupsTree  = _CswNbtResources.Trees.getTreeFromView(invGrpView, false, true, true);
            int         InvGroupsCount = invGroupsTree.getChildNodeCount();

            if (InvGroupsCount > 1 && false == _CswNbtResources.CurrentNbtUser is CswNbtSystemUser)
            {
                throw new CswDniException(CswEnumErrorType.Warning, "Cannot disable the MultiInventoryGroup Module when multiple Inventory Groups exist", InvGroupsCount + " Inventory Group nodes exist, cannot disable the MultiInventoryGroup module");
            }
            else
            {
                QuotasAct.SetQuotaForObjectClass(invGrpOC.ObjectClassId, 1, true);
            }

            // CIS-51775
            CswNbtMetaDataObjectClass LocationOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.LocationClass);

            foreach (Int32 LocationNodeTypeId in LocationOC.getNodeTypeIds().Keys)
            {
                _CswNbtResources.Modules.HideProp(LocationNodeTypeId, CswNbtObjClassLocation.PropertyName.InventoryGroup);
            }
            CswNbtMetaDataObjectClass RequestItemOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.RequestItemClass);

            foreach (Int32 RequestItemNodeTypeId in RequestItemOC.getNodeTypeIds().Keys)
            {
                _CswNbtResources.Modules.HideProp(RequestItemNodeTypeId, CswNbtObjClassRequestItem.PropertyName.InventoryGroup);
            }
            _CswNbtResources.Modules.ToggleView(true, "Inventory Groups", CswEnumNbtViewVisibility.Global);
        } // OnDisable()
        } // GetQuotas()

        public bool SaveQuotas(string inQuotas)
        {
            JObject inQuotasJson = JObject.Parse(inQuotas);

            if (_CanEditQuotas)
            {
                foreach (JObject JObjClass in inQuotasJson["objectclasses"].Children().Values())
                {
                    Int32 ObjectClassId       = CswConvert.ToInt32(JObjClass["objectclassid"]);
                    Int32 NewOCQuota          = CswConvert.ToInt32(JObjClass["quota"]);
                    bool  ExcludeInQuotaBarOC = CswConvert.ToBoolean(JObjClass["excludeinquotabar"]);
                    _CswNbtActQuotas.SetQuotaForObjectClass(ObjectClassId, NewOCQuota, ExcludeInQuotaBarOC);

                    foreach (JObject JNodeType in JObjClass["nodetypes"].Children().Values())
                    {
                        Int32 NodeTypeId          = CswConvert.ToInt32(JNodeType["nodetypeid"]);
                        Int32 NewNTQuota          = CswConvert.ToInt32(JNodeType["quota"]);
                        bool  ExcludeInQuotaBarNT = CswConvert.ToBoolean(JNodeType["excludeinquotabar"]);
                        _CswNbtActQuotas.SetQuotaForNodeType(NodeTypeId, NewNTQuota, ExcludeInQuotaBarNT);
                    } // foreach( DataRow OCRow in OCTable.Rows )
                }     // foreach( DataRow OCRow in OCTable.Rows )
                return(true);
            }         // if( CanEditQuotas )
            else
            {
                return(false);
            }
        } // SaveQuotas()
        protected override void OnEnable()
        {
            int             invGrpOC_Id = _CswNbtResources.MetaData.getObjectClassId(CswEnumNbtObjectClass.InventoryGroupClass);
            CswNbtActQuotas QuotasAct   = new CswNbtActQuotas(_CswNbtResources);

            QuotasAct.SetQuotaForObjectClass(invGrpOC_Id, Int32.MinValue, false);

            // CIS-51775
            CswNbtMetaDataObjectClass LocationOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.LocationClass);

            foreach (Int32 LocationNodeTypeId in LocationOC.getNodeTypeIds().Keys)
            {
                _CswNbtResources.Modules.ShowProp(LocationNodeTypeId, CswNbtObjClassLocation.PropertyName.InventoryGroup);
            }
            CswNbtMetaDataObjectClass RequestItemOC = _CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.RequestItemClass);

            foreach (Int32 RequestItemNodeTypeId in RequestItemOC.getNodeTypeIds().Keys)
            {
                _CswNbtResources.Modules.ShowProp(RequestItemNodeTypeId, CswNbtObjClassRequestItem.PropertyName.InventoryGroup);
            }
            _CswNbtResources.Modules.ToggleView(false, "Inventory Groups", CswEnumNbtViewVisibility.Global);
        } // OnEnable()