Public Sub BindDBGrd(ByVal sqlstr As String, ByVal myDBGrd As DataGrid, ByVal SortExp As Object)
If myConn.State = ConnectionState.Closed Then
myConn.Open()
End If
Fill(sqlstr)
Dim dv As DataView = ds.Tables(0).DefaultView
dv.Sort = SortExp
myDBGrd.DataSource = dv
myDBGrd.DataBind()
End Sub
Private Sub BindDBGrid()
Dim sqlstr As String = "select * from BookInfo,LendInfo where BookInfo.BookID=LendInfo.BookID and UserID='" + Session("UserID") + "'"
BindDBGrd(sqlstr, DataGrid1)
End Sub
End Class
点击图书借阅登记:
Imports System.Data.SqlClient
Public Class lendbook
Inherits System.Web.UI.Page
Private connectingstring As String
Private myConn As SqlConnection
Private ds As DataSet
Private myAdapter As SqlDataAdapter
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>