All pastes #575668 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-19 04:21 UTC
rendered paste body
Protected Sub GridView1_RowDataBound(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) _
Handles GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
      	Dim statLine As New StatLineDAL
            Dim battingStats As BattingLine = _
statLine.GetBattingLineByPlayerId( _
e.Row.Cells(0).Text, calDate.SelectedDate)

            If Not (battingStats.AtBats = 0 And _
battingStats.Walks = 0 And _
battingStats.RBIs = 0 And _
battingStats.Runs = 0 And _
battingStats.StolenBases = 0) Then
            e.Row.Cells(2).Text = battingStats.AtBats
            e.Row.Cells(3).Text = battingStats.Hits
            e.Row.Cells(4).Text = battingStats.Runs
            e.Row.Cells(5).Text = battingStats.HomeRuns
            e.Row.Cells(6).Text = battingStats.RBIs
            e.Row.Cells(7).Text = battingStats.StolenBases
            e.Row.Cells(8).Text = String.Format("{0:f3}", _
battingStats.Average)
                e.Row.Cells(10).Text = String.Format("{0:f3}", _
battingStats.Slugging)
            End If
End If
End Sub