Пример #1
0
        private void UpdateListBoxProducts()
        {
            var allProducts = _productControl.GetAllProducts();

            listBoxProducts.Items.Clear();
            foreach (Product product in allProducts)
            {
                listBoxProducts.Items.Add(product);
                // mangler at printe toString metoden i listen
            }
        }
        public UpdateProductGUI()
        {
            InitializeComponent();

            pctr                      = new ProductControl();
            brands                    = (List <Brand>)pctr.GetAllBrands();
            categories                = (List <Category>)pctr.GetAllCategories();
            BrandCombo.ItemsSource    = brands;
            CategoryCombo.ItemsSource = categories;

            listProducts.ItemsSource = pctr.GetAllProducts();
        }
Пример #3
0
 public IEnumerable <ServiceProduct> GetAllProducts()
 {
     return(productControl.GetAllProducts());
 }