Public Class HomePage
Inherits System.Web.UI.Page
Protected WithEventslblDate As System.Web.UI.WebControls.Label
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEventslblOrders As System.Web.UI.WebControls.Label
Protected WithEvents Label3 As System.Web.UI.WebControls.Label
Protected WithEventslblTitle 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
'Put user code to initialize the page here
If Not Page.IsPostBack Then
' Retrieve the number of pending orders
Dim OrderObj As New OrderServices()
Dim OrderDs As DataSet = OrderObj.GetOrders(Nothing, OrderDb.ORDER_STATUS_PENDING, Nothing)
If Not OrderDs Is Nothing Then
Me.lblOrders.Text = OrderDs.Tables(0).Rows.Count
Else
Me.lblOrders.Text = "No pending orders"
End If
Me.lblDate.Text = Now.ToLongDateString
End If
End Sub
End Class