Dim c As DataCol = DataTables("财务科相关").DataCols("实收工资")
Dim d As DataCol = DataTables("财务科相关").DataCols("应收提成")
Dim a As String = c.name
Dim b As String = d.name
For Each dr As DataRow In DataTables("财务科相关").DataRows
If dr("是否会员") = True Then
If dr("a") <= 39 Then
dr("b") = 0
ElseIf dr("a") > 39 And dr("a") <= 59 Then
dr("b") = dr("a") * 0.05
ElseIf dr("a") > 59 And dr("a") <= 99 Then
dr("b") = 3 + (dr("a") - 60) * 0.1
ElseIf dr("a") > 99 Then
dr("b") = 7 + (dr("a") - 100) * 0.2
End If
Else
If dr("a") <= 39 Then
dr("b") = 0
ElseIf dr("a") > 39 And dr("a") <= 59 Then
dr("b") = dr("a") * 0.1
ElseIf dr("a") > 59 And dr("a") <= 99 Then
dr("b") = 6 + (dr("a") - 60) * 0.15
ElseIf dr("a") > 99 Then
dr("b") = 12 + (dr("a") - 100) * 0.2
End If
End If
Next
我写的相关代码如上,附图如下,请大师帮忙!!!!
此主题相关图片如下:无标题.jpg