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
|
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim userCtrl As CheckBoxList
Dim li As ListItem
Dim dm As New DataManager("DataCon")
Dim lpar As New List(Of DataParametre)
Dim dt As DataTable
Dim param As String = ""
userCtrl = CType(PreviousPage.FindControl("chkCateg"), CheckBoxList)
For Each li In userCtrl.Items
If li.Selected = True Then
param &= li.Value & ","
End If
Next
param = Left(param, param.Length - 1)
lpar.Add(New DataParametre("param1", param, SqlDbType.Variant))
dt = dm.ExecuterRequeteTabulaire("RechRap", lpar)
If dt.Rows.Count = 0 Then
Label1.Visible = True
Else
GridView1.DataSource = dt
End If
End Sub |
Partager