Select Case e.DataCol.Name
Case "身份证号码"
If e.OldValue > "" AndAlso e.OldValue <> e.NewValue Then
Dim dr As DataRow = DataTables("入职信息").Find("身份证号码='" & e.OldValue & "'")
If dr IsNot Nothing Then dr("身份证号码") = e.NewValue
Else If e.NewValue > "" Then
Dim dr As DataRow = DataTables("入职信息").Find("身份证号码='" & e.NewValue & "'")
If dr Is Nothing Then
dr = DataTables("入职信息").AddNew
dr("身份证号码") = e.NewValue
End If
End If
Case "姓名","年龄"
Dim dr As DataRow = DataTables("入职信息").Find("身份证号码='" & e.DataRow("身份证号码") & "'")
If dr IsNot Nothing Then
dr(e.DataCol.Name) = e.DataRow(e.DataCol.Name)
End If
End Select