Public Class Dashboard2
    Inherits System.Web.UI.Page

    Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        Try
            If Not Master.CurrentDriver Is Nothing Then
                dsHistory.ConnectionString = Logic.Database.ConnectionString
                dsHistory.SelectParameters("accountId").DefaultValue = Master.CurrentDriver.id

                dsCurrent.ConnectionString = Logic.Database.ConnectionString
                dsCurrent.SelectParameters("accountId").DefaultValue = Master.CurrentDriver.id

            Else
                Response.Redirect("/Driver2/Login2.aspx", False)

            End If


        Catch ex As Exception
            Dim errorId = Logic.Error.Log(ex)
            Response.Redirect("/Error.aspx?id=" & errorId)
        End Try
    End Sub

    Private Sub repHistory_ItemDataBound(sender As Object, e As EventArgs) Handles repHistory.ItemDataBound
        repHistory.Visible = repHistory.Items.Count > 0
    End Sub

    Private Sub repCurrent_ItemDataBound(sender As Object, e As EventArgs) Handles repCurrent.ItemDataBound
        'If repCurrent.Items.Count > 0 Then
        '    phMessage.Visible = False
        'Else
        '    phMessage.Visible = True
        'End If
        repCurrent.Visible = repCurrent.Items.Count > 0
    End Sub

End Class