Select Case e.DataCol.name
Case "毛坯编码","返修结果"
Dim dr As DataRow = e.DataRow
If dr.IsNull("毛坯编码") = False AndAlso dr.IsNull("返修结果") = False Then
If DataTables("加工过程不良_明细").Compute("Count([_Identify])","毛坯编码 = \'" & dr("毛坯编码") & "\' And 返修结果 = \'" & dr("返修结果") & "\'") > 1 Then
MessageBox.Show("不能重复判定废品,重新输入!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow(e.DataCol.Name) = e.OldValue \'取消输入
ElseIf DataTables("过程异常明细").sqlCompute("Count([_Identify])","毛坯编码 = \'" & dr("毛坯编码") & "\' And 返修结果 = \'" & dr("返修结果") & "\'") > 0 Then
MessageBox.Show("不能重复判定废品,重新输入!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow(e.DataCol.Name) = e.OldValue \'取消输入
End If
End If
End Select