public void Prepare() { prodRef = new ProductReference.ProductClient(); catRef = new CategoryReference.CategoryClient(); prods = new List <ProductReference.TProduct>(prodRef.ReadAll()); cats = new List <CategoryReference.TCategory>(catRef.ReadAll()); }
private void refreshButton_Click(object sender, EventArgs e) { productsBox.Items.Clear(); productsBox.Items.AddRange(productRef.ReadAll()); newNameBox.Clear(); newDescBox.Clear(); newCategoryComboBox.Text = ""; newStockBox.Clear(); newPriceBox.Clear(); nameBox.Clear(); descBox.Clear(); categoryComboBox.Text = ""; stockBox.Clear(); priceBox.Clear(); }
private void refreshButton_Click(object sender, EventArgs e) { productsBox.DataSource = null; productsBox.DataSource = prodRef.ReadAll(); }