Пример #1
0
        protected int GetProductCount(object dataItem)
        {
            Vendor v = (Vendor)dataItem;

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

            _ProductCounts[v.Id] = count;
            return(count);
        }