private void loadInformation() { ProdListV.Refresh(); ProdListV.Items.Clear(); ListViewItem itm; var its = _category.SelectAll(); foreach (Category pr in its) { itm = new ListViewItem(); itm.Text = pr.category_id.ToString(); itm.SubItems.Add(pr.categoryname); this.ProdListV.Items.Add(itm); } }
private void loadInformation() { ProdListV.Refresh(); ProdListV.Items.Clear(); ListViewItem itm; var its = _supplier.SelectAll(); foreach (supplier pr in its) { itm = new ListViewItem(); itm.Text = pr.supplier_id.ToString(); itm.SubItems.Add(pr.Supplier_name); itm.SubItems.Add(pr.Supplier_address); itm.SubItems.Add(pr.Supplier_contact); this.ProdListV.Items.Add(itm); } }