Dim cmd As new SQLCommand
cmd.ConnectionName = conn
'------POS窗口控件-------------------------------------------------
Dim T1 As Table = Forms(posckm).Controls("Table1").Table 'POS明细表
Dim r As Row 'POS明细表的行
Dim TB1 As WinForm.TextBox = Forms(posckm).Controls("TextBox1") '单号
Dim TB3 As WinForm.TextBox = Forms(posckm).Controls("TextBox3") ' 备注
Dim DTP1 As WinForm.DateTimePicker = Forms("POS").Controls("DateTimePicker1")
Dim CmB1 As WinForm.ComboBox = Forms(posckm).Controls("ComboBox1") '销售方式
Dim CmB2 As WinForm.ComboBox = Forms(posckm).Controls("ComboBox2") '营业员
Dim NC2 As WinForm.NumericComboBox = Forms("POS").Controls("NumericComboBox2") '原价总额
'本窗口控件
Dim cmb11 As WinForm.ComboBox = e.Form.Controls("ComboBox1") ' 领导姓名
Dim TB11 As WinForm.TextBox = e.Form.Controls("TextBox1") ' 受赠者姓名
Dim TB22 As WinForm.TextBox = e.Form.Controls("TextBox1") ' 受赠者姓名
Dim BT2 As WinForm.Button = e.Form.Controls("Button2") '确定按钮
If TB11.value = Nothing Then
MessageBox.Show("请输入受赠者姓名!","提示")
Return
End If
保存后再打开就成这样了
cmd.ConnectionName = conn
'------POS窗口控件-------------------------------------------------
Dim T1 As Table = Forms(posckm).Controls("Table1").Table 'POS明细表
Dim r As Row 'POS明细表的行
Dim TB1 As WinForm.TextBox = Forms(posckm).Controls("TextBox1") '单号
Dim TB3 As WinForm.TextBox = Forms(posckm).Controls("TextBox3") ' 备注
Dim CmB1 As WinForm.ComboBox = Forms(posckm).Controls("ComboBox1") '销售方式
Dim CmB2 As WinForm.ComboBox = Forms(posckm).Controls("ComboBox2") '营业员
Dim NC2 As WinForm.NumericComboBox = Forms("POS").Controls("NumericComboBox2") '原价总额
'本窗口控件
Dim cmb11 As WinForm.ComboBox = e.Form.Controls("ComboBox1") ' 领导姓名
Dim TB11 As WinForm.TextBox = e.Form.Controls("TextBox1") ' 受赠者姓名
Dim BT2 As WinForm.Button = e.Form.Controls("Button2") '确定按钮
If TB11.value = Nothing Then
MessageBox.Show("请输入受赠者姓名!","提示")
Return
End If
粉色的行不见了,斷条了