我把你最后一段计算级别工资的代码修改了一下:
'【级别工资】计算代码
Select Case e.DataCol.Name
Case "职务","任职年限1","工作年限1"
Dim dr2 As DataRow
Dim Filter2 As String
Filter2 = " [职务] = '" & e.DataRow("职务") & "'and [任职年限] = '" & e.DataRow("任职年限1") & "'"
dr2 = DataTables("级别工资").Find(Filter2)
If dr2 IsNot Nothing Then
Dim nm As String = "工作年限_" & e.DataRow("工作年限1")
If DataTables("级别工资").DataCols.Contains(nm)
e.DataRow("级别工资") = dr2(nm)
End If
End If
End Select