Foxtable所有范例代码(8)

2019-08-20 19:16

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


Foxtable所有范例代码(8).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:JAVA-AOSUite文件,图片上传功能

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: