互相影响了,但是怎么样影响的要自己调试了,简单的就屏蔽事件
Select Case e.DataCol.name Case "毛坯编码","成品流水号","成品编码" Dim dr As DataRow = e.DataRow If dr.IsNull("毛坯编码") = False AndAlso dr.IsNull("成品流水号") = False AndAlso dr.IsNull("成品编码") = False ThenSystemReady = False
If DataTables("产成品入库_录入").Compute("Count([_Identify])","毛坯编码 = '" & dr("毛坯编码") & "' And 成品流水号 = '" & 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("成品流水号") & "' And 成品编码 = '" & dr("成品编码") & "'") > 0 Then
MessageBox.Show("成品流水号重复,重新输入!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow(e.DataCol.Name) = e.OldValue '取消输入
End If
SystemReady = true
End If
End Select