我是参照将军仓管写的afterload,把我不需要的删了
Dim t1 As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim t2 As WinForm.TextBox = e.Form.Controls("TextBox2")
'Dim t4 As WinForm.TextBox = e.Form.Controls("TextBox4")
Dim t5 As WinForm.TextBox = e.Form.Controls("TextBox5")
Dim t3 As WinForm.TextBox = e.Form.Controls("TextBox3")
Dim dr As DataRow
dr = DataTables("系统参数表").Find("类别 = '本企业名称'") '找出编号为03的产品
t5.Value = dr("内容") & "V1.0" & " 咨询:QQ31358568"
报表目录=ProjectPath & "\报表\"
t1.Value =User.name
t2.Value = Date.Now
't4.value="咨询:QQ31358568"
Dim tv As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim bar As WinForm.NavBar = e.Form.Controls("NavBar1")
Dim nd As WinForm.TreeNode
MainTable = Tables("库存")
Bar.SelectedIndex=0
Tables("库存").OpenRecordGrid()
Tables("库存").Filter =""
Tables("库存").Filter ="[当前库存] <>0"
t3.Value = "本次查询表中共有" & Tables("库存").Rows.count & "条记录"
Tables("库存").AutoSizeCols()
'Forms("出入库单").Close
tv.Nodes.Clear
tv.BuildTree("库存", "货品类型|货品名称")
nd = tv.Nodes.Insert("加载全部记录","加载全部记录",0)
' MessageBox.Show("已经移动到最顶部! " )
Dim r1 As WinForm.RadioButton = e.Form.Controls("RadioButton1")
r1.Checked=True
Dim n1 As WinForm.NavBar = e.Form.Controls("NavBar1")
MainTable = Tables("库存")
Forms("往来企业").Close
关停事件=False
主要就是删了上面一段,那为什么他的treeview可以顺利运行呢?