--
Select Case e.DataCol.Name
Case "入库时间","出库时间"
Dim dr As DataRow = e.DataRow
If dr.IsNull("入库时间") OrElse dr.IsNull("出库时间") Then
dr("仓库保管时间") = Nothing
Else
Dim tp As TimeSpan = dr("出库时间") - dr("入库时间")
dr("仓库保管时间") = tp.TotalDays
If dr("仓库保管时间")>30 Then
dr("超过30天") ="是"
Else
dr("超过30天") ="否"
End If
End If
End Select