Select Case e.DataCol.name Case "标准", "结果" Dim str As String = e.DataRow("标准") If str = Nothing OrElse e.DataRow.IsNull("结果") Then e.DataRow("判定") = Nothing Else Dim fhs() As String = {">", "=", "<"} Dim ary() As String For Each f As String In fhs If str.Indexof(f) Then If str.IndexOf("x") >= 0 Then ary = str.split("x") Else ary = new String() {str} End If str = "pass" For Each s As String In ary Dim flag = False For Each fh As String In fhs If s.IndexOf(fh) = s.Length-1 Then flag = True End If Next Dim ns As String = iif(flag=True, s & e.DataRow("结果"), e.DataRow("结果") & s) Functions.remove("函数") Dim Code As String Code = "return " & ns Functions.Add("函数",Code) Functions.Complie() Dim result = Functions.Execute("函数") If result = False Then str = "fail" End If Next e.DataRow("判定") = str Exit For End If Next End If End Select
|