コード例 #1
0
        /*
         * Queries the service for all catalog items which match the brand and type filter (if any)
         */
        public void LoadCatalogItems(int brandIdFilter, int typeIdFilter)
        {
            _view.ClearGrid();
            IEnumerable <CatalogItem> items = _service.GetCatalogItems(brandIdFilter, typeIdFilter);
            double       discountVal        = 0;
            DiscountItem discount           = _service.GetDiscount(DateTime.Now);

            if (discount != null)
            {
                discountVal = discount.Size;
            }

            _view.SetCatalogItems(items, discountVal);
        }