private void show_valueInDGVItems()
{
Int32 CustomerID;
CustomerID = Convert.ToInt32(label_Custmer_ID.Text);
string query3 = "select * from Table_InvoiceItem WHERE CustomerID=@parameter1";
using (SqlConnection con3 = new SqlConnection("Data source=INVENTOR-6FBADA\\SQLEXPRESS;Initial Catalog=AnindyaCD;Integrated Security=SSPI"))
{
using (SqlCommand cmd3 = new SqlCommand(query3, con3))
{
cmd3.Parameters.AddWithValue("@parameter1", CustomerID);
using (SqlDataAdapter ad = new SqlDataAdapter(query3, con3))
{
ad.SelectCommand = cmd3;
DataSet ds = new DataSet();
ad.Fill(ds, "Table_InvoiceItem");
dataGridView_showItemtoSell.DataSource = ds.Tables[0];
}
}
}
}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE