menuforregisteredusers.aspx.vb.bak

来自「网络营销系统.net版.rar」· BAK 代码 · 共 63 行

BAK
63
字号
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 = "Welcome <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 Bid.Item = New Bid.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 + =
减小字号Ctrl + -
显示快捷键?