public void UpdateProduct(Product product) { ProductGateway gateway = new ProductGateway(); this.Product = gateway.GetProducts(product.Name, product.ProductCategory, 1, 0)[0]; this.FormCreateMode = false; this.Title = "Edit " + product.Name; }
private void BindProducts() { if (CategoryComboBox.SelectedIndex > -1) { ProductGateway gateway = new ProductGateway(); ProductsListView.ItemsSource = gateway.GetProducts(NameTextBox.Text, CategoryComboBox.SelectedItem as ProductCategory); } }
private void BindProducts() { if (CategoryComboBox.SelectedIndex > -1) { ProductGateway gateway = new ProductGateway(); ProductsListView.ItemsSource = gateway.GetProducts(NameTextBox.Text, CategoryComboBox.SelectedItem as ProductCategory, PageSize, this.currentPageNumber); this.UpdateNavigationButtons(); } }