Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. //load datagridview products
  2. MySqlDataAdapter ada = new MySqlDataAdapter("select products.kode_Barang,category.name,brands.name,products.name,products.qty,products.harga FROM products INNER JOIN category on products.id_category = category.id_category INNER JOIN brands ON products.id_Brands = brands.id_brands", con);
  3. //delete products, category, brands from products INNER JOIN category inner join brands where products.id_products = category.id_category and products.id_products = brands.id_brands
  4. DataSet dt = new DataSet();
  5. ada.Fill(dt);
  6.  
  7. foreach(a as DataRow in dt.tables[0].Rows) {
  8. datagridview1.rows.add(a("namatable") dst)
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement