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
MessageBox.Show("货号输入错误","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
Dim r As DataRow = DataTables("GB").AddNew
r("SPDM") = s.SubString(0,7)
r("GG1DM") = s.SubString(7,2)
r("GG2DM") = s.SubString(9,2)
r.save()
e.Cancel = True
title.SelectAll
End If