1 2 3 4 5 6 7
| SqlConnection conn = new SqlConnection(@"Data Source=PEMCODEV;Initial Catalog=Gestock;Integrated Security=True");
SqlCommand cmd = new SqlCommand();
conn.Open();
cmd.CommandText = "INSERT INTO CLIENT(Numero_client,Nom_client,Adresse,Rue_client,Code_postal,Ville_client,Telephone_client ) VALUES('" + TxtNumero_clt.Text + "','" + TxtNom.Text + "','" + TxtAdresse.Text + "','" + Txtrue.Text + "','" + TxtCode_post.Text + "','" + TxtVille.Text + "','" + TxtTel.Text + "')";
cmd.ExecuteNonQuery();
conn.Close();
MessageBox.Show("Les données ont été enregistrées avec succès!"); |
Partager