private void AddProductsToTabbedPanel() { int i = 1; foreach (TabPage tp in tabControl1.TabPages) { ObjectQuery<tblproduct> filteredProduct = new ObjectQuery<tblproduct>("SELECT VALUE P FROM tblProduct AS P WHERE P.ProductType=" + i.ToString(),pce); FlowLayoutPanel flp = new FlowLayoutPanel { Dock = DockStyle.Fill }; foreach (tblProduct tprod in filteredProduct) { Button b = new Button { Size = new Size(100, 100), Text = tprod.Description, Tag = tprod }; b.Click += new EventHandler(UpdateProductList); tp.Controls.Add(b); flp.Controls.Add(b); }
private void FilterList(object sender, EventArgs e) { ObjectQuery<tblproduct> filteredProducts = new ObjectQuery<tblproduct>("SELECT VALUE product FROM tblProducts AS product WHERE product.ProductType = " + cboFilter.SelectedValue,pce); dataGridView1.DataSource = filteredProducts; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)