1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20:
private " notpretty " () { Int32 CustomerID; CustomerID = Convert.ToInt32 (label_Custmer_ID.Text); la secuencia query3 = “selecciona * de Table_InvoiceItem DONDE CustomerID=@parameter1”; el usar (SqlConnection con3 = nuevo SqlConnection (“\ \ SQLEXPRESS de los datos source=INVENTOR-6FBADA; Catalog=AnindyaCD inicial; Security=SSPI integrado”)) { usando (SqlCommand cmd3 = nuevo SqlCommand (query3, con3)) { cmd3.Parameters.AddWithValue (“@parameter1”, CustomerID); usando (anuncio de SqlDataAdapter = nuevo SqlDataAdapter (query3, con3)) { ad.SelectCommand = cmd3; Grupo de datos ds = nuevo grupo de datos (); anuncio. Terraplén (ds, “Table_InvoiceItem”); dataGridView_showItemtoSell.DataSource = ds. Tablas [0]; } } } }
1: 2: 3: 4: 5: 6: 7: 8: