⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menuforregisteredusers.aspx.vb

📁 该系统是关于c2c电子商务系统 用asp.net技术 开发环境是vs2003+sqlserver2000
💻 VB
字号:
Public Class MenuForRegisteredUsers
    Inherits System.Web.UI.Page
    Protected WithEvents Table1 As System.Web.UI.WebControls.Table
    Protected WithEvents lblUserName As System.Web.UI.WebControls.Label
    Protected WithEvents myWinningBids As System.Web.UI.WebControls.DataGrid
    Protected WithEvents lblMsg As System.Web.UI.WebControls.Label
    Protected WithEvents lblStatus As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' if they haven't logged in send them to the default menu
        If Tools.IsLoggedIn Then
            lblUserName.Text = "欢迎 <b>" & Request.Cookies("email").Value & "</b><br>"
        Else
            Response.Redirect("default.aspx")
        End If

        If Not Page.IsPostBack Then
            BindGrid()
        End If
        lblStatus.Text = Request.QueryString("msg")

    End Sub

    Private Sub BindGrid()
        Dim intPersonID As Int32 = CInt(Request.Cookies("personid").Value)
        Dim objItemList As C2CSystem.Item = New C2CSystem.Item()

        myWinningBids.DataSource = objItemList.GetMyWinningBids(intPersonID)
        myWinningBids.DataBind()
    End Sub

    Sub myWinningBids_ItemCreated(ByVal Sender As Object, ByVal e As DataGridItemEventArgs)

        If e.Item.ItemType = ListItemType.Item Or _
           e.Item.ItemType = ListItemType.AlternatingItem Then
            Dim temphypAcceptBid As HyperLink
            temphypAcceptBid = e.Item.FindControl("hypItemName")
            temphypAcceptBid.Attributes.Add("onclick", "return confirm('You are about to buy this product?');")
        End If

    End Sub

    Public Function FormatURL(ByVal intItemID As Int32, ByVal dblWinningBid As Double) As String
        Return "AcceptBid.aspx?itemid=" & intItemID & "&bid=" & dblWinningBid
    End Function

End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -