Kooboo.Commerce.Products.ProductTypeService.Disable C# (CSharp) Method

Disable() public method

public Disable ( ProductType type ) : bool
type ProductType
return bool
        public bool Disable(ProductType type)
        {
            if (!type.IsEnabled)
            {
                return false;
            }

            type.IsEnabled = false;
            _productTypes.Database.SaveChanges();

            Event.Raise(new ProductTypeDisabled(type), _instance);

            return true;
        }