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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| <%
'Recuperation de l'id grace a Session
dim idcandidat
idcandidat=Session("idd")
Dim conn As New MySql.Data.MySqlClient.MySqlConnection
Dim Cmde As MySql.Data.MySqlClient.MySqlCommand
Dim myConnectionString,mySelectQuery as String
myConnectionString = "server=localhost;" _
& "uid=root;" _
& "pwd=;" _
& "database=teamlab;"
conn.ConnectionString = myConnectionString
conn.Open()
'Recuperation Projet (Tite & Description)
mySelectQuery = "SELECT * FROM `projects_project_participant`,`projects_projects` WHERE `projects_project_participant`.`participant_id` = '" & idcandidat & "' AND `projects_project_participant`.`project_id` = `projects_projects`.`id`"
Cmde = New MySql.Data.MySqlClient.MySqlCommand()
With Cmde
.Connection = conn
.CommandText = mySelectQuery
End With
Try
Cmde.ExecuteNonQuery()
DIM dr = Cmde.ExecuteReader
dim i=0
If dr.HasRows Then
If Not Page.IsPostBack Then
While dr.Read
i=i+1
projet.Text = projet.Text & "Projet n " & i & ":<br><br>" & "Titre du projet: "& dr("title") &"<br>Description du projet: "& dr("description") & "<br><br>"
End While
End If
End If
dr.Close()
Catch ex As Exception
lblText.Text = "Record Cannot Insert : Error (" & ex.Message & ")"
End Try
'Recuperation de TASK (Titre & Description)
mySelectQuery = "SELECT * FROM `projects_project_participant`,`projects_tasks`WHERE `projects_project_participant`.`participant_id` = '" & idcandidat & "'AND `projects_project_participant`.`project_id` = `projects_tasks`.`id`"
Cmde = New MySql.Data.MySqlClient.MySqlCommand()
With Cmde
.Connection = conn
.CommandText = mySelectQuery
End With
Try
Cmde.ExecuteNonQuery()
DIM dr = Cmde.ExecuteReader
If dr.HasRows Then
If Not Page.IsPostBack Then
While dr.Read
task.Text = task.Text & "Titre de la tache: " & dr("title") & "<br>Description de la tache: " & dr("description")& "<br>"
End While
End If
End If
dr.Close()
Catch ex As Exception
lblText.Text = "Record Cannot Insert : Error (" & ex.Message & ")"
End Try
Cmde = Nothing
conn.Close()
conn = Nothing
%> |
Partager