e.SelectString = \订单 Where 编号 < 0\End If
计划管理
表事件
窗口表事件
窗口与控件事件
窗口1_AfterLoad
Dim cmd As New SQLCommand Dim dt As DataTable
cmd.ConnectionName = \
cmd.CommandText = \产品,客户 From 订单\dt = cmd.ExecuteReader()
Dim trv As WinForm.TreeView = e.Form.Controls(\trv.BuildDataTree(dt, \产品\客户\
窗口1_TreeView1_NodeMouseDoubleClick
Dim Value()As String Dim Filter As string
Value = e.Node.FullPath.Split(\Select Case e.Node.Level Case 0
Filter =\产品] = '\ Case 1
Filter =\产品] = '\客户] = '\End Select
DataTables(\订单\DataTables(\订单\
自定义函数
全局代码
菜单事件
======================================= =====动态加载演示.Foxdb=====
项目事件
BeforeLoadInnerTable
If e.DataTableName = \订单\ e.Filter = \End If
计划管理
表事件
36
窗口表事件
窗口与控件事件
窗口1_AfterLoad
Dim cmd As New SQLCommand Dim dt As DataTable
cmd.CommandText = \产品,客户 From {订单}\dt = cmd.ExecuteReader()
Dim trv As WinForm.TreeView = e.Form.Controls(\trv.BuildDataTree(dt, \产品\客户\
窗口1_TreeView1_NodeMouseDoubleClick
Dim Value()As String Dim Filter As string
Value = e.Node.FullPath.Split(\Select Case e.Node.Level Case 0
Filter =\产品] = '\ Case 1
Filter =\产品] = '\客户] = '\End Select
DataTables(\订单\DataTables(\订单\
自定义函数
全局代码
菜单事件
======================================= =====动态目录树列表.Foxdb=====
项目事件
MainTableChanged
If MainTable.Name = \客户\ Dim tb As New DropTreeBuilder
tb.SourceTable = DataTables(\行政区域\指定目录树表 tb.TreeCols = \省|县市\指定用于生成目录树的列 tb.SourceCols = \省|县市|区号|邮编\指定数据来源列 tb.ReceiveCols = \省|县市|区号|邮编\指定数据接收列 Tables(\客户\省\End If
计划管理
表事件
窗口表事件
37
窗口与控件事件
自定义函数
全局代码
菜单事件
======================================= =====单元格绘图.Foxdb=====
项目事件
计划管理
表事件
表A_DrawCell '''
If e.Col.Name = \进度\进度\ e.StartDraw()
Dim Width As Integer = (e.Width - 2 )* e.Row(\进度\ If e.Row(\进度\
e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2) Else
e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2) End If
e.EndDraw() End If
窗口表事件
窗口与控件事件
自定义函数
全局代码
菜单事件
======================================= =====可视化授权.Foxdb=====
项目事件
LoadUserSetting
For Each t As Table In Tables '显示所有表和列 t.Visible = True t.AllowEdit = true
For Each c As Col In t.Cols c.Visible = True
38
c.AllowEdit = True Next Next
Tables(\授权表\If User.Type <> UserTypeEnum.User Then Return End If
For Each dr As DataRow In DataTables(\授权表\用户名 = '\ If dr.IsNull(\列名\
For each t As Table In Tables
If t.DataTable.Name = dr(\表名\ t.Visible = Not dr(\不可见\
t.AllowEdit = Not dr(\不可编辑\ End If Next Else
For each t As Table In Tables
If t.DataTable.Name = dr(\表名\ For Each c as Col In t.Cols
If c.Name = dr(\列名\
c.Visible = Not dr(\不可见\ c.AllowEdit = Not dr(\不可编辑\ End If Next End If Next End if Next
计划管理
表事件
授权表_PrepareEdit
If e.Col.Name = \列名\
Dim s As String = e.Row(\表名\
If s > \ Dim t As Table = Tables(s) s = \
For Each c As Col In t.Cols s = s & \ Next
e.Col.ComboList = s End If End If
窗口表事件
窗口与控件事件
自定义函数
全局代码
39
菜单事件
======================================= =====基本功能介绍.Foxdb=====
项目事件
计划管理
表事件
窗口表事件
窗口与控件事件
窗口1_AfterLoad
Dim Lines() As String = FileSys.ReadAllText(ApplicationPath &
\Dim tv As WinForm.TreeView = e.Form.Controls(\Dim nd As WinForm.TreeNode
For i As Integer = 0 To Lines.Length - 1 Dim s As String = Lines(i)
Dim l As Integer = s.Length - s.Trim(vbtab).Length Dim p() As String = s.Trim(vbtab).Split(\ If l = 0 Then
nd = tv.Nodes.Add(p(1),p(0)) Else
If l = nd.Level + 1 Then
nd = nd.nodes.Add(p(1),p(0)) Elseif l = nd.level Then
nd = nd.ParentNode.Nodes.Add(p(1), p(0)) Else Do
nd = nd.ParentNode
If nd.Level = l - 1 Then
nd = nd.Nodes.Add(p(1), p(0)) Exit Do End If Loop End If End If
If p.length = 3 Then
nd.IconFile = \ Else
nd.IconFile = \ End If Next
tv.Nodes(0).Expand()
Dim wb As WinForm.WebBrowser = e.Form.Controls(\wb.Address = ApplicationPath & \
窗口1_TreeView1_AfterSelectNode
Dim wb As WinForm.WebBrowser = e.Form.Controls(\
40