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
| Public Partial Class GestionAdmin
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim table As String
dr = selectclient()
Application("count_visitor") += 1
table = "<table border ='1' width='50%'>"
table &= "<tr> <td>code</td> <td>Nom</td> <td>Adresse</td><td>Ville</td><td>Tele</td><td>Login</td><td>Pass</td><td>Modifier</td><td>Supprimer</td> </tr>"
Try
If dr.HasRows Then
While dr.Read
table &= "<tr> <td>" & dr(0) & " </td> <td>" & dr(1) & "</td> <td>" & dr(2) & "</td> <td>" & dr(3) & " </td> <td>" & dr(4) & "</td><td>" & dr(5) & " </td><td>" & dr(6) & " </td> <td><a title ='Supprimer les information de" & dr(1) & "' href='GestionClient.aspx?action=supprimer&id=" & dr(0) & "' >Supprimer</a> </td><td><a title ='modifier les information de" & dr(1) & "' href='GestionClient.aspx?action=modifier&id=" & dr(0) & "'>modifier</a></td></tr>"
End While
Else
table &= "<tr> <td colspan ='7'> n'existe pas </td></tr>"
End If
table &= "</table>"
Label1.Text = table
dr.Close()
Catch ex As Exception
End Try
' Label1.Text &= "<br> le nombre de visiteur est " & Application("count_visitor") & "</br>"
Select Case Request.QueryString("action")
Case "supprimer"
If IsNumeric(Request.QueryString("id")) Then
removeclient(Request.QueryString("id"))
Label2.Text = "le client a été bien suprimer"
Else
Label3.Text = "erreur Fatale"
End If
MsgBox("action=" & vbNewLine & "id" & Request.QueryString("id"))
End Select
cn.Close()
End Sub
End Class |
Partager