1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
cmd.Connection = cn
cmd.CommandType = CommandType.Text
cmd.CommandText = "insert into vol_programme(numéro_vol,code_ville,code_ville_a,fréquence)values('" & TextBox1.Text & "','" & TextBox2.Text & "', '" & TextBox7.Text & "', '" & TextBox12.Text & "')"
cmd.Connection = cn
cmd.CommandType = CommandType.Text
cmd.CommandText = "insert into depart(code_ville,nom,pays,date_depart,heure_depart)values('" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "')"
Try
cmd.ExecuteNonQuery()
MessageBox.Show("this flight is ready to take off", "WanaSoft", MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub |
Partager