If e.DataCol.Name = "下单时间" Then
Dim d As Date = e.DataRow("下单时间")
Dim td As Date = new Date(d.Year, d.Month, d.Day)
If d = Nothing Then
e.DataRow("取报告") = Nothing
ElseIf d.hour>=10 AndAlso d.hour < 13 Then
e.DataRow("取报告") = td.AddHours(15)
ElseIf d.hour>=13 AndAlso d.hour < 17 Then
e.DataRow("取报告") = td.AddHours(19)
ElseIf d.hour>=17 AndAlso d.hour < 21 Then
e.DataRow("取报告") = td.AddHours(21)
ElseIf d.hour>=21 AndAlso d.hour < 23 Then
e.DataRow("取报告") = td.AddHours(25)
ElseIf d.hour>=23 Then
e.DataRow("取报告") = td.AddHours(24+12)
ElseIf d.hour<10 Then
e.DataRow("取报告") = td.AddHours(12)
End If
End If