Select Case e.DataCol.Name
Case "核算标准","单位"
Dim dr As DataRow = e.DataRow
Dim pr As DataRow
Dim mqbt As Double
If dr.IsNull("核算标准") OrElse dr.IsNull("单位") Then
'mqbt = Nothing
Else
Dim filter As String
filter = "核算标准 = '" & dr("核算标准") & "' And 单位 = '" & dr("单位") & "'"
pr = DataTables("核算标准").Find(filter)
If pr IsNot Nothing Then
mqbt =CDbl( pr("满勤补贴"))
End If
End If
End Select
Select Case e.DataCol.Name
Case "核算标准","单位"
Dim dr As DataRow = e.DataRow
Dim pr As DataRow
Dim qqkc As Double
If dr.IsNull("核算标准") OrElse dr.IsNull("单位") Then
qqkc = Nothing
Else
Dim filter As String
filter = "核算标准 = '" & dr("核算标准") & "' And 单位 = '" & dr("单位") & "'"
pr = DataTables("核算标准").Find(filter)
If pr IsNot Nothing Then
qqkc = CDbl(pr("缺勤扣除"))
End If
End If
End Select
If e.DataCol.Name = "出勤状况" Then
If e.DataRow("出勤状况") = "√" Then
e.DataRow("出勤补贴") = mqbt
ElseIf e.DataRow("出勤状况") = "-1"
e.DataRow("出勤补贴") = mqbt-qqkc*1
ElseIf e.DataRow("出勤状况") = "-2"
e.DataRow("出勤补贴") = mqbt-qqkc*2
ElseIf e.DataRow("出勤状况") = "-3"
e.DataRow("出勤补贴") = mqbt-qqkc*3
ElseIf e.DataRow("出勤状况") = "-4"
e.DataRow("出勤补贴") = mqbt-qqkc*4
ElseIf e.DataRow("出勤状况") = "-5"
e.DataRow("出勤补贴") = mqbt-qqkc*5
Else
e.DataRow("出勤补贴") = Nothing
End If
End If