End Sub
Private Sub ResultGrid_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles ResultGrid.PageIndexChanged
ResultGrid.CurrentPageIndex = e.NewPageIndex
BindGrid()
End Sub
Private Sub ResultGrid_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles ResultGrid.SortCommand
Dim sqlstr As String
If viewstate("sortexp") Is Nothing Then
viewstate("sortexp") = e.SortExpression.ToString
ElseIf viewstate("sortexp") = e.SortExpression.ToString Then
viewstate("sortexp") += " desc"
Else
viewstate("sortexp") = e.SortExpression.ToString
End If
If Not Session("sqlstr") Is Nothing Then
sqlstr = CType(Session("sqlstr"), String)
BindDBGrd(sqlstr, ResultGrid, Viewstate("sortexp"))
End If
End Sub
Public Sub ExecNonSql(ByVal sqlstr As String)
If myConn.State = ConnectionState.Closed Then
myConn.Open()
End If
myCmd = New SqlCommand(sqlstr, myConn)
myCmd.ExecuteNonQuery()
myCmd.Dispose()
Close()
End Sub
End Class
可以根据书名,内容进行查询,我们选取任意匹配:
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>