web/SysVIP.aspx.vb

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

Imports BLL
Imports Model
Imports System.Data
Imports System.Data.SqlClient
Partial Class SysVIP
    Inherits System.Web.UI.Page
    Dim Syscrf As New SystemBLL()
    Dim sysuserinfo As New USERINFOBLL
    Dim struserinfo As New UserInfo
    Private PageSearch As New PageShareMethod
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        delete_btn.Attributes.Add("onclick", "javascript:return confirm('Are you sure to delete ?');")
        GridViewBind()
        GridViewCount()
    End Sub


    Public Sub GridViewBind()
        Dim conn As New SqlConnection(Syscrf.Context)
        conn.Open()
        Dim da As New SqlDataAdapter("SELECT * from VIPTABLE " & strWhereTxt() & "  ORDER BY CreatedDate DESC", conn)
        Dim ds As New DataSet()
        da.Fill(ds, AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, "CRFView")
        AspNetPager1.AlwaysShow = True
        CATEGRID.DataSource = ds
        CATEGRID.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 VIPTABLE  " & strWhereTxt(), conn)
        cmd.Connection = conn
        AspNetPager1.RecordCount = CInt(cmd.ExecuteScalar())
        AspNetPager1.RecordCount = CInt(cmd.ExecuteScalar())
        cmd.Dispose()
        conn.Close()
        conn.Dispose()
    End Sub

    Private Function strWhereTxt() As String
        PageSearch.AddWhereItem("VIPID", txt_VIPID.Text.Trim, 1)
        PageSearch.AddWhereItem("NAME", txt_name.Text.Trim, 1)
        Return PageSearch.MakeWhereText()
        PageSearch = Nothing
    End Function

    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

    Protected Sub delete_btn_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles delete_btn.Click
后面还有 113 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。