Select case
Case "身份证号码" If e.NewValue Is Nothing Then Return Else Dim dt As Date = ReadBirthday(e.NewValue)
Dim td As Date = Date.Today
Dim n As Integer = td.Year - dt.Year If dt.AddMonths(n*12) > td Then n = n - 1 End If
e.DataRow("出生日期") = dt e.DataRow("年龄") = n End If
End select