Dim t As WinForm.Table = e.Form.Controls("Table1")
Dim LId As WinForm.Label = e.Form.Controls("LId")
Dim CbFilter As WinForm.ComboBox = e.Form.Controls("CbFilter")
Dim TFilter As WinForm.TextBox = e.Form.Controls("TFilter")
Dim btnSearch As WinForm.Button = e.Form.Controls("BtnSearch")
Dim btnPrint As WinForm.Button = e.Form.Controls("btnPrint")
Dim CbType As WinForm.ComboBox = e.Form.Controls("CbType")
Dim TCode As WinForm.TextBox = e.Form.Controls("TCode")
Dim TName As WinForm.TextBox = e.Form.Controls("TName")
Dim TBox As WinForm.TextBox = e.Form.Controls("TBox")
Dim TAdd As WinForm.TextBox = e.Form.Controls("TAdd")
Dim TCP As WinForm.TextBox = e.Form.Controls("TCP")
Dim TCell As WinForm.TextBox = e.Form.Controls("TCell")
Dim TTel As WinForm.TextBox = e.Form.Controls("TTel")
Dim TFax As WinForm.TextBox = e.Form.Controls("TFax")
Dim TEM As WinForm.TextBox = e.Form.Controls("TEM")
Dim TWC As WinForm.TextBox = e.Form.Controls("TWC")
Dim TWA As WinForm.TextBox = e.Form.Controls("TWA")
Dim TMemo As WinForm.TextBox = e.Form.Controls("TMemo")
CbFilter.Enabled = False
CbFilter.Value = Nothing
TFilter.Enabled = False
TFilter.Value = Nothing
btnSearch.Enabled = False
btnPrint.Enabled = False
t.Table.Filter = "[_Identify] Is Null"
e.Form.Controls("btnAdd").Enabled = False '问题代码行
e.Form.Controls("btnMod").Enabled = False
e.Form.Controls("btnSave").Enabled = False
e.Form.Controls("btnCancel").Enabled = True
LId.Text = Vars("ShopCode") & Vars("TermiCode")
Dim nr As DataRow = t.Table.DataTable.SQLAddNew()
nr("sys_ID") = LId.Text
nr.Save()
CbType.Enabled = True
CbType.Value = Nothing
TCode.Value = Nothing
TName.Enabled = True
TName.Value = Nothing
TBox.Enabled = True
TBox.Value = Nothing
TAdd.Enabled = True
TAdd.Value = Nothing
TCP.Enabled = True
TCP.Value = Nothing
TCell.Enabled = True
TCell.Value = Nothing
TTel.Enabled = True
TTel.Value = Nothing
TFax.Enabled = True
TFax.Value = Nothing
TEM.Enabled = True
TEM.Value = Nothing
TWC.Enabled = True
TWC.Value = Nothing
TWA.Enabled = True
TWA.Value = Nothing
TMemo.Enabled = True
TMemo.Value = Nothing