1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| private void Raffraichir(int iIdEnteteCommande)
{
SqlCommand sqlco1= new SqlCommand("SelectionDetailCommande");
sqlco1.CommandType=CommandType.StoredProcedure;
sqlco1.Connection=sqlConn1;
//sqlco1.CommandType=CommandType.Text;
SqlParameter _id=new SqlParameter("@iIdEnteteCommande",SqlDbType.Int);
_id.Value= Convert.ToInt32(iIdEnteteCommande);
sqlco1.Parameters.Add(_id);
SqlDataAdapter sdaEtat = new SqlDataAdapter(sqlco1);
DSfournisseur1 = new DataTable("fournisseur1");
try
{
sdaEtat.Fill(DSfournisseur1);
}
catch(Exception exp)
{
MessageBox.Show(exp.ToString());
StreamWriter txt1 = File.AppendText("c:\\Log\\Journal_Erreur.txt");
txt1.WriteLine("\nError :"+DateTime.Now.ToString()+" :"+exp.Message);
txt1.Flush();
txt1.Close();
}
dataGrid1.DataSource = DSfournisseur1;
dataGrid1.DataMember = "fournisseur1";
} |
Partager