web/Statusmanage.aspx.vb

(开头部分) 3KB

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

Imports BLL
Imports Model
Imports System.Data
Imports System.Data.SqlClient
Partial Class Statusmanage
    Inherits System.Web.UI.Page
    Dim Syscrf As New SystemBLL()
    Dim sysstatus As New STATUSBLL
    Dim strstatus As New STATUS
    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 STATUS  ORDER BY CREATEDATE 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 STATUS ", 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

    Protected Sub delete_btn_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles delete_btn.Click
        Dim strdel As String = ""
        Dim tt As String = ""
        Dim str As String = ""
        Dim ckb As String() = Nothing
        str = Request.Form.[Get]("checkboxname")
        If str = "" Then
            Response.Write("<script>alert('pls select the records to delete');</script>")
        Else

            ckb = str.Split(New Char() {","c})
            For i As Integer = 0 To ckb.Length - 1
                tt += ckb(i) & ","
后面还有 27 行代码,解锁后查看完整代码

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

AI 解读

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

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