1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
detail d = new detail();
SqlConnection connect = new SqlConnection("Data source=redmonster-PC; Initial Catalog=chasse;Integrated Security=True;Asynchronous Processing=true;");
SqlCommand command = new SqlCommand("SELECT libelle,date,prix FROM ligne_facture WHERE type_dep='depense'", connect);
SqlDataAdapter DtA = new SqlDataAdapter(command);
DataSet DtS = new DataSet();
connect.Open();
DtA.Fill(DtS, "depense");
DGVdep.DataSource = DtS.Tables["depense"];
connect.Close();
DGVdep.SelectionMode = DataGridViewSelectionMode.FullRowSelect; |
Partager