示例#1
0
 /// <summary>
 /// Binds results of gateway.GetProducts(string ProductName, ProductCategory p) to the ListView control.
 /// </summary>
 private void BindProducts()
 {
     if (CategoryComboBox.SelectedIndex > -1)
     {
         ProductsListView.ItemsSource = gateway.GetProducts(NameTextBox.Text, CategoryComboBox.SelectedItem as ProductCategory);
     }
 }
示例#2
0
 public List <Product> GetProducts()
 {
     return(gateway.GetProducts());
 }
 public List <Product> ShowProducts()
 {
     productList = productGateway.GetProducts();
     return(productList);
 }
 public void UpdateProduct(Product product)
 {
     this.product   = gateway.GetProducts(product.Name, product.ProductCategory)[0];
     FormCreateMode = false;
     this.Title     = "Edit " + product.Name;
 }
示例#5
0
 public List <ProductWithCategory> GetAllProducts()
 {
     return(aProductGateway.GetProducts());
 }