此主题相关图片如下:2.png
表属性数据变动代码
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.Delete
End If
End If
End Select
窗口按下压键代码
If e.KeyCode = keys.Enter Then
Dim title As WinForm.TextBox = e.Form.Controls("title")
Dim s As String = title.Text
If s.Length <> 11 AndAlso s.Length <> 12
MessageBox.Show("货号输入错误","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
Dim r As DataRow = DataTables("GB").AddNew
If s.Length = 11 Then
r("SPDM") = s.SubString(0,7)
r("GG1DM") = s.SubString(7,2)
r("GG2DM") = s.SubString(9,2)
r("MDDM") = User.Name
r.save()
Else
r("SPDM") = s.SubString(0,8)
r("GG1DM") = s.SubString(8,2)
r("GG2DM") = s.SubString(10,2)
r("MDDM") = User.Name
r.save()
End If
e.Cancel = True
title.SelectAll
End If
应该是红色部分冲突了吧
[此贴子已经被作者于2020/6/15 2:46:12编辑过]