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 35 36
| Protected Sub tableau_result_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles tableau_result.Load
Dim req As String
Dim con As String
Dim req2 As String
con = "Data Source=VAYSSE-PC\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=STAT_FOOT;"
Dim sqlConnection1 As New SqlConnection(con)
Dim cmd As New SqlCommand
req = "SELECT EQUIPES.logo,Match.EQUIPE1,Match.EQUIPE2,cast(Match.but_1 as varchar(2))+ '-' +cast(Match.but_2 as varchar(2)) as score "
req = req + " FROM Match, EQUIPES"
req = req + " WHERE(Match.journee = 1)"
req = req + " AND Match.EQUIPE1 = EQUIPES.NOM"
req2 = "select nom_equipe as Equipe,Classement,Victoire, Nul, Defaite as Défaite,Points,Difference from classement_GEN order by CLASSEMENT asc"
Dim dt As New DataTable
Using query As New SqlCommand(req, sqlConnection1)
Using adapt As New SqlDataAdapter(query)
adapt.Fill(dt)
End Using
End Using
Dim dt2 As New DataTable
Using query As New SqlCommand(req2, sqlConnection1)
Using adapt As New SqlDataAdapter(query)
adapt.Fill(dt2)
End Using
End Using
Result.DataSource = dt
Result.DataBind()
Classement.DataSource = dt2
Classement.DataBind()
End Sub |
Partager