Private Sub LoadRoomList()
Try
objConn = New SqlConnection(sysconfig)
If (objConn.State = ConnectionState.Open) Then
objConn.Close()
End If
objConn.Open()
Dim sqlRoomName As String
Dim dt As New DataTable
sqlRoomName = "SELECT RoomID,RoomName,RoomLocation FROM MeetingRoom_V2 WHERE RoomStatus='A' AND RoomLV<='" & Session("mLV") & "'"
objCmd = New SqlCommand(sqlRoomName, objConn)
dtAdapter = New SqlDataAdapter(objCmd)
dtAdapter.Fill(dt)
If dt.Rows.Count > 0 Then
ddlRoomSL.DataSource = dt
ddlRoomSL.DataTextField = "RoomName"
ddlRoomSL.DataValueField = "RoomID"
ddlRoomSL.DataBind()
ddlRoomSL.Items.Insert(0, "Please select room.")
End If
Catch ex As Exception
Finally
objConn.Close()
End Try
End Sub