Select Case e.DataCol.Name
Case "入院日期","出院日期"
Dim dr As DataRow = e.DataRow
If dr.IsNull("入院日期") OrElse dr.IsNull("出院日期") Then
dr("住院天数") = Nothing
If dr.IsNull("入院日期") = False Then
dr("入院第二天") = dr("入院日期").AddDays(1)
dr("入院第三天") = dr("入院日期").AddDays(2)
dr("入院第八天") = dr("入院日期").AddDays(7)
End If
Else
Dim tp As TimeSpan = dr("出院日期") - dr("入院日期")
dr("住院天数") = tp.TotalDays
'If tp.TotalDays > 1 Then
dr("入院第二天") = dr("入院日期").AddDays(1)
'End If
'If tp.TotalDays > 6 Then
dr("入院第三天") = dr("入院日期").AddDays(2)
'End If
'If tp.TotalDays > 6 Then
dr("入院第八天") = dr("入院日期").AddDays(7)
'End If
End If
End Select
上面代码中“入院日期”是表达式列的话这个代码需要调整吗,不计算怎么回事儿?