Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
 public IEnumerable <ServiceProduct> GetAllProducts()
 {
     return(productControl.GetAllProducts());
 }