Skip to content

Instantly share code, notes, and snippets.

@SajjadArifGul
Created October 8, 2015 18:34
Show Gist options
  • Save SajjadArifGul/895803aca9eb0c1c4c11 to your computer and use it in GitHub Desktop.
Save SajjadArifGul/895803aca9eb0c1c4c11 to your computer and use it in GitHub Desktop.
CustomerID = Convert.ToInt32(CustomerIDTextBox2.Text);
dataGridView4.Show();
SqlConnection con = new SqlConnection(path);
con.Open();
SqlCommand com = new SqlCommand("Select * From InvoiceDetails where CustomerID = '" + CustomerID + "'", con);
SqlDataAdapter sda = new SqlDataAdapter(com);
DataTable dt = new DataTable();
sda.Fill(dt);
dataGridView4.DataSource = dt.DefaultView;
con.Close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment