-- 作者:nncchh
-- 发布时间:2018/3/21 22:47:00
-- 发布后不能使用
win7系统,高开版发帖前各窗体打开没有问题,发布后打开窗体出现以下问题,请帮助解决同,还有,发布后在win10系统打不开。
.NET Framework 版本:2.0.50727.8762 Foxtable 版本:2018.3.9.1 错误所在事件:窗口,矫正统计,AfterLoad 详细错误信息: 未将对象引用设置到对象的实例。
Dim s As Integer Dim Filter As String If e.Form.Controls("TextBox2").Value IsNot Nothing Then s = e.Form.Controls("TextBox2").Value Else s = 20 End If If user.Type = UserTypeEnum.User Then If Functions.Execute("sq","调解机构管理","调解机构审核") Then Filter = "" Else Filter = "主管单位 = \'" & user.Group & "\'" End If Else Filter = "" End If
Dim dt As DataTable Dim b As New SQLGroupTableBuilder("统计表1","调解机构表") b.C b.Groups.AddDef("主管单位") b.Filter = Filter b.Totals.AddDef("_Identify",AggregateEnum.Count,"人数") \'根据主键列来统计记录数,也就是订单数 dt = b.Build(True) \'参数设置为True,生成一个临时表,不在主界面显示 \'然后根据统计表生成目录树 Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.BuildTree(dt, "主管单位") trv.StopRedraw For Each nd As WinForm.TreeNode In trv.AllNodes Dim dw As String = nd.DataRow("主管单位") Select Case nd.Level Case 0 nd.Text = nd.text & "(" & dt.Compute("Sum(人数)","主管单位 = \'" & dw & "\'") & "条)" End Select Next trv.Nodes.Insert("加载所有行","加载所有行(" & dt.Compute("Sum(人数)") & "条)",0) trv.ResumeRedraw
With DataTables("调解机构表") .LoadFilter = Filter \'设置加载条件 .LoadPage = 0 \'加载第一页 .LoadTop = s \'每页5行 .Load() e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages End With
[此贴子已经被作者于2018/3/24 22:21:30编辑过]
|
-- 作者:nncchh
-- 发布时间:2018/3/24 22:23:00
-- 发布后不能使用
Dim s As Integer Dim Filter As String If e.Form.Controls("TextBox2").Value IsNot Nothing Then s = e.Form.Controls("TextBox2").Value Else s = 20 End If If user.Type = UserTypeEnum.User Then If Functions.Execute("sq","调解机构管理","调解机构审核") Then Filter = "" Else Filter = "主管单位 = \'" & user.Group & "\'" End If Else Filter = "" End If
Dim dt As DataTable Dim b As New SQLGroupTableBuilder("统计表1","调解机构表") b.C b.Groups.AddDef("主管单位") b.Filter = Filter b.Totals.AddDef("_Identify",AggregateEnum.Count,"人数") \'根据主键列来统计记录数,也就是订单数 dt = b.Build(True) \'参数设置为True,生成一个临时表,不在主界面显示 \'然后根据统计表生成目录树 Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.BuildTree(dt, "主管单位") trv.StopRedraw For Each nd As WinForm.TreeNode In trv.AllNodes Dim dw As String = nd.DataRow("主管单位") Select Case nd.Level Case 0 nd.Text = nd.text & "(" & dt.Compute("Sum(人数)","主管单位 = \'" & dw & "\'") & "条)" End Select Next trv.Nodes.Insert("加载所有行","加载所有行(" & dt.Compute("Sum(人数)") & "条)",0) trv.ResumeRedraw
With DataTables("调解机构表") .LoadFilter = Filter \'设置加载条件 .LoadPage = 0 \'加载第一页 .LoadTop = s \'每页5行 .Load() e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages End With
|