If e.DataCol.Name = "身份证号码" Then
If e.NewValue Is Nothing Then
e.DataRow("本期收入") = Nothing
e.DataRow("计薪年月") = Nothing
e.DataRow("养老保险") = Nothing
e.DataRow("医疗保险") = Nothing
e.DataRow("失业保险") = Nothing
e.DataRow("住房公积金") = Nothing
Else
Dim dr As DataRow
dr = DataTables("工资总表").Find("[姓名ID] = \'" & e.NewValue & "\'")
If dr IsNot Nothing
e.DataRow("本期收入") = dr("应发总额")
e.DataRow("计薪年月") = dr("计薪年月")
e.DataRow("养老保险") = dr("养老保险")
e.DataRow("医疗保险") = dr("医疗保险")
e.DataRow("失业保险") = dr("失业保险")
e.DataRow("住房公积金") = dr("住房公积金")
End If
End If
End If
If e.DataCol.name = "计薪年月" Then
If e.newvalue = Nothing Then
e.DataRow("月份") = Nothing
Else
e.DataRow("月份") = e.newvalue.month
End If
End If
If e.DataCol.name = "月份" Then
If e.newvalue IsNot Nothing Then
e.DataRow("已应税工资") = e.DataRow("总应税工资")
End If
End If