web/Desk.aspx.vb
(完整代码) 1KBImports BLL
Imports Model
Imports System.Data
Imports System.Data.SqlClient
Partial Class Desk
Inherits System.Web.UI.Page
Dim Syscrf As New SystemBLL
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GridViewBind()
GridViewCount()
End Sub
Public Function strwheretxt() As String
Dim roledt As DataTable = Syscrf.seachData("select groupid from ROLETABLE where userid='" & Request.Cookies("sh")("userid").ToString & "'").Tables(0)
Return roledt.Rows(0)("groupid")
Syscrf.sqlClose()
End Function
Public Sub GridViewBind()
Dim strsql As String = "SELECT * FROM [ROLEGROUPVIEW] where groupid='" & strwheretxt() & "' and LINKURL<>'' order by PARENTNO"
Dim conn As New SqlConnection(Syscrf.Context)
conn.Open()
Dim da As New SqlDataAdapter(strsql, conn)
Dim ds As New DataSet()
da.Fill(ds, AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, "ERPToLGT")
AspNetPager1.AlwaysShow = True
PDataList.DataSource = ds
PDataList.DataBind()
ds.Dispose()
da.Dispose()
conn.Close()
conn.Dispose()
End Sub
Public Sub GridViewCount()
Dim conn As New SqlConnection(Syscrf.Context)
conn.Open()
Dim cmd As New SqlCommand("SELECT count(*) FROM [ROLEGROUPVIEW] where groupid='" & strwheretxt() & "' and LINKURL<>''", conn)
cmd.Connection = conn
AspNetPager1.RecordCount = CInt(cmd.ExecuteScalar())
AspNetPager1.RecordCount = CInt(cmd.ExecuteScalar())
cmd.Dispose()
conn.Close()
conn.Dispose()
End Sub
Protected Sub AspNetPager1_PageChanging(ByVal src As Object, ByVal e As Wuqi.Webdiyer.PageChangingEventArgs) Handles AspNetPager1.PageChanging
AspNetPager1.CurrentPageIndex = e.NewPageIndex
GridViewBind()
GridViewCount()
End Sub
End Class
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
