private void loadtbl() { supplier_tb.Items.Clear(); cn.Open(); cmd.CommandText = "select * from SupplierTable"; cmd.Connection = cn; dr = cmd.ExecuteReader(); while (dr.Read()) { ListViewItem item = new ListViewItem(dr["Supp_ID"].ToString()); item.SubItems.Add(dr["Supp_Name"].ToString()); item.SubItems.Add(dr["Supp_Address"].ToString()); item.SubItems.Add(dr["Supp_CPerson"].ToString()); item.SubItems.Add(dr["Supp_TelNo"].ToString()); item.SubItems.Add(dr["Supp_FaxNo"].ToString()); item.SubItems.Add(dr["Supp_Email"].ToString()); item.SubItems.Add(dr["Supp_TIN"].ToString()); item.SubItems.Add(dr["Supp_Status"].ToString()); item.SubItems.Add(dr["Supp_Term"].ToString()); item.SubItems.Add(dr["Supp_Category"].ToString()); supplier_tb.Items.Add(item); } cn.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)