Dim dr As DataRow = e.DataRow If e.DataCol.Name = "投保日期" Then IF dr.IsNull("投保日期") Then dr("保险到期") = Nothing Else dr("保险到期") = dr("投保日期").AddDays(366) End If ElseIf e.DataCol.Name = "二维到期" Then IF dr.IsNull("二维到期") Then dr("二维日龄") = Nothing Else Dim Val As Date = dr("二维到期") dr("二维日龄") = (Date.Today -Val).Days End If End If