KeyDownEdit代码。都会报未将对象引用设置到对象实例。
If e.keyCode = Keys.Enter AndAlso e.Table.Cols(e.Table.colSel).Name = "SN" Then
e.cancel = True
Dim r As Row = e.Table.addnew
e.Table.Se lect(r.Index, 0)
e.Table.StartEditing
If r Is Nothing Then
Dim m As New MailSender
m.Host = "mail.bdcom.com.cn"
m.Account = "factory@bdcom.com.cn"
m.Password = "Encrypt228HqJ4Mg"
m.From = "factory@bdcom.com.cn"
'm.AddReceiver("rksh@bdcom.com.cn")
'm.AddReceiver("shw@bdcom.com.cn")
m.AddReceiver("liujiyong@bdcom.com.cn")
m.Title = vars("xsckdph") & "---现已完成配货了"
m.Content = vars("xsckdph") & "---现已完成配货了"
m.SendAsync()
Dim phzl As WinForm.Button = Forms("库存管理界面").Controls("配货整理")
'
Dim sum2 As Integer = DataTables("销售出库单列表").SQLCompute("count(发货单号)","配货状态 = 0")
phzl.text = "配货整理" & "(" & sum2 & ")"
MessageBox.show("请让出库品管校验,只有校验完才能进行下一单配货,切记,切记","出库品管校验",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
e.Table.S elect(r.Index, 0)
e.Table.StartEditing
End If
End If
If e.keyCode = Keys.Enter AndAlso e.Table.Cols(e.Table.colSel).Name = "SN" Then
e.cancel = True
Dim r As Row = e.Table.addnew
e.Table.S elect(r.Index, 0)
e.Table.StartEditing
End If