Select Case e.DataCol.Name
Case "个人类别","现任职务","职务区分"
Dim dr As DataRow
If e.DataRow.IsNull("个人类别") OrElse e.DataRow.IsNull("现任职务") OrElse e.DataRow.IsNull("职务区分") Then
e.DataRow("基本工资_职务工资") = Nothing
Else
dr = DataTables("公员工资标准").Find("[职务] = '" & e.DataRow("现任职务") & "'")
If e.DataRow("个人类别")= "公员" And e.DataRow("职务区分")= "领导职务" And dr IsNot Nothing Then
e.DataRow("基本工资_职务工资") = dr("职务工资_领导职务")
ElseIf e.DataRow("个人类别")= "公员" And e.DataRow("职务区分")= "非领导职务" And dr IsNot Nothing Then
e.DataRow("基本工资_职务工资") = dr("职务工资_非领导职务")
End If
End If
Case "个人类别","岗位等级"
If e.DataRow("个人类别") <> Nothing AndAlso e.DataRow("岗位等级") <> Nothing Then
Dim tname As String = "机关工勤工资标准"
If DataTables.Contains(tname) = False Then
msgbox("不存在表" & tname)
Else
Dim dt As DataTable = DataTables(tname)
Dim filter As String = "职务 = '" & e.DataRow("现任职务") & "'"
Dim fdr As DataRow = dt.find(filter)
If fdr IsNot Nothing Then
e.DataRow("基本工资_职务工资") = fdr(e.DataRow("岗位等级"))
Else
e.DataRow("基本工资_职务工资") = Nothing
End If
End If
Else
e.DataRow("基本工资_职务工资") = Nothing
End If
Case "个人类别","现任职务","岗位等级"
Dim dr As DataRow = e.DataRow
Dim pr As DataRow
If dr.IsNull("个人类别") Then
dr("基本工资_职务工资") = Nothing
Else
Dim filter As String
If dr("个人类别") = "事业单位专业技术" Then
filter = "专业技术人员_级别 = '" & dr("岗位等级") & "'"
pr = DataTables("事业单位工资标准").Find(filter)
If pr IsNot Nothing Then
dr("基本工资_职务工资") = pr("专业技术人员_岗位工资")
End If
ElseIf dr("个人类别") = "事业单位管理岗" Then
filter = "管理人员_级别 = '" & dr("岗位等级") & "'"
pr = DataTables("事业单位工资标准").Find(filter)
If pr IsNot Nothing Then
dr("基本工资_职务工资") = pr("管理人员_岗位工资")
End If
ElseIf dr("个人类别") = "事业单位工人" Then
filter = "工人_岗位 = '" & dr("现任职务") & "'"
pr = DataTables("事业单位工资标准").Find(filter)
If pr IsNot Nothing Then
dr("基本工资_职务工资") = pr("工人_岗位工资")
End If
End If
End If
End Select