试试这个苯办法代码:
Dim d As DataRow = e.DataRow
If e.DataCol.Name = "装版方式" Then
Dim dr As DataRow = DataTables("设备参数").find("印刷设备 = '" & d("印刷设备") & "'")
Dim cj As Double = d("印张数") - dr("起印刷数")
If dr IsNot Nothing Then
If d("装版方式") = "单面印刷" Then
Dim s As String = dr("起印费") + cj * dr("每印价")
d("印刷费") = eval(s)
ElseIf d("装版方式") = "正反印刷" Then
Dim s As String = dr("起印费") * 2 + cj * dr("每印价")
d("印刷费") = eval(s)
End If
End If
End If