Select Case e.DataCol.name
Case "SPDM","GG1DM","GG2DM"
Dim dr As DataRow = e.DataRow
If dr.IsNull("SPDM") = False AndAlso dr.IsNull("GG1DM") = False AndAlso dr.IsNull("GG2DM") = False Then
If e.DataTable.Compute("Count([_Identify])","SPDM = \'" & dr("SPDM") & "\' And GG1DM = \'" & dr("GG1DM") & "\' And GG2DM =\'" & dr("GG2DM") & "\' ") > 1 Then
MessageBox.Show("该商品已挂板","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow(e.DataCol.Name) = e.OldValue \'取消输入
End If
End If
End Select
这样依然会写在表上