Ejemplo n.º 1
0
        protected int GetProductCount(object dataItem)
        {
            Manufacturer m = (Manufacturer)dataItem;

            if (_ProductCounts.ContainsKey(m.Id))
            {
                return(_ProductCounts[m.Id]);
            }
            int count = ProductDataSource.CountForManufacturer(m.Id);

            _ProductCounts[m.Id] = count;
            return(count);
        }
Ejemplo n.º 2
0
        protected bool HasProducts(object dataItem)
        {
            Manufacturer m = (Manufacturer)dataItem;

            return(ProductDataSource.CountForManufacturer(m.Id) > 0);
        }