当证件号码不是身份证号码时,以下的代码怎么修改,可以显示为:当证件号码为其他时,“年龄”“性别”不再根据身份证号码来计算并显示了,只显示横杆
If e.DataCol.Name = "证件号码" Then
If e.NewValue > "" Then
e.DataRow("性别") = ReadSex(StrToNarrow(e.NewValue))
If e.DataRow.IsNull("性别") = True Then
e.DataRow("性别") = "-"
End If
Dim y,m,d As Integer
DateYMD(ReadBirthDay(StrToNarrow(e.NewValue)),Date.Today,y,m,d)
e.DataRow("年龄") = y
If e.DataRow("年龄") > 100 Then
e.DataRow("年龄") = "-"
End If
End If
End If