If e.DataCol.Name = "交货日期" OrElse e.DataCol.Name = "下单日期" OrElse e.DataCol.name = "验收日期" Then If e.DataRow.IsNull("验收日期") = False Then e.DataRow("剩余时间") = Nothing e.DataRow("交期时长") = Nothing Else Dim ts As TimeSpan = cdate(e.DataRow("交货日期")) - Date.Today Dim t1s As TimeSpan = cdate(e.DataRow("交货日期")) - cdate(e.DataRow("下单日期")) e.DataRow("剩余时间") = ts.TotalDays & "天" e.DataRow("交期时长") = t1s.TotalDays & "天" End If End If
|