以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]求助目录树列表项目总消失 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=134004) |
-- 作者:小巫仙 -- 发布时间:2019/4/25 10:24:00 -- [求助]求助目录树列表项目总消失 在列属性的目录树列表中规定了目录树表,但每次登陆项目后列表都是空的,得需要重新打开一下列属性再关掉才会出来列表项目,请问大神这个是bin的问题吗? |
-- 作者:有点甜 -- 发布时间:2019/4/25 13:30:00 --
你是不是按住了ctrl不放打开项目的?如果是,这个时候、表达式列、设置、代码,都不会生效的。
|
-- 作者:小巫仙 -- 发布时间:2019/4/26 7:53:00 -- 没有按ctrl,是用的内置用户管理正常登陆的,开发者和普通用户都出现这个问题,我是把所有列表项目放在了两个表里(表A表B),表A的目录树列表,也就是两层以上的都不好使,单层的列表项目好使,表B的两层以上的好使。我新建了一个项目,复现不出来 |
-- 作者:有点蓝 -- 发布时间:2019/4/26 9:31:00 -- 新项目没有问题。肯定是有其他设置或者代码影响了。看看这个表有没有保存表视图,删除掉 |
-- 作者:小巫仙 -- 发布时间:2019/4/27 18:35:00 -- 应该不是表视图的事,没有对表视图做操作,全篇代码除了系统菜单没有view,而且我试着把有下拉菜单内容的存了个表视图,再打开项目登进去调用表视图还是没有下拉项目 |
-- 作者:有点甜 -- 发布时间:2019/4/28 10:23:00 -- 以下是引用小巫仙在2019/4/27 18:35:00的发言:
应该不是表视图的事,没有对表视图做操作,全篇代码除了系统菜单没有view,而且我试着把有下拉菜单内容的存了个表视图,再打开项目登进去调用表视图还是没有下拉项目
你这个项目,是试用版的还是开发版?如果是试用版,应该是试用期到了;如果是开发版,就是你有影响的代码,看看afterOpenProject等事件。 |
-- 作者:小巫仙 -- 发布时间:2019/4/28 13:00:00 -- 开发版 afteropenproject里代码是: BaseMainForm.Text = "财务管理系统" basemainform.visible=False If QQClient.Ready Then MessageBox.show("QQClient已经启动,请先关闭","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Return End If QQClient.ServerIP = "#######" (服务器IP) QQClient.ServerPort = 52177 QQClient.UserName = "" QQClient.Password = "" If QQClient.Start() = True \'如果登录成功 Dim msg As String = "恭喜,OpenQQ登录成功!" If QQClient.ServerMessage > "" Then msg = msg & QQClient.ServerMessage End If PopMessage(msg,"提示",PopiconEnum.Infomation,5) Else PopMessage("QQClient登录失败,原因:" & vbcrlf & QQClient.ServerMessage,"提示",PopiconEnum.Error,5) End If Forms("上边").open Forms("滑动导航栏").open basemainform.controls("C1Ribbon1").visible=False Forms("主页").open TableCaptionVisible = False MainTable = Tables("房间台账") Dim btn As WinForm.Button = Forms("滑动导航栏").Controls("1") btn.PerformClick() LoadUserSetting里代码是: Dim dt() As String = {"现金银行帐","业主合同信息","业主账单","租户合同台账","租户账单","分类项目表","区域分" & _ "类项目表","定金违约","居间","配货台账","配货流转","外联装修维修","维修配件台账","报修工单","员工登记表","月度" & _ "汇总","员工欠款","员工工资","节假日","空置统计","库房台账","备用金账","租户押金","业主押金","业主生活物" & _ "品","票据印制记录","水电燃有线","房间台账","房屋业绩","租户信息台账","系统数据设置","房源账单","业主定金","授" & _ "权表","易耗品出库"} Dim t As DataTable For i As Integer = 0 To dt.Length -1 t = DataTables(dt(i)) Select Case t.Name Case "分类项目表","节假日","系统数据设置","授权表" t.loadFilter = "" \'一定要清除加载条件 t.load() Case "现金银行帐" If User.Group = "全部" t.loadFilter = "" \'一定要清除加载条件 t.loadTop = 20 t.loadPage =t.TotalPages - 1 t.load() Else t.loadFilter = "账套 = \'" & User.Group & "\' " \'一定要清除加载条件 t.loadTop = 20 t.loadPage = t.TotalPages - 1 t.load() End If Case Else If User.Group = "全部" t.loadFilter = "" \'一定要清除加载条件 t.load() Else t.loadFilter = "账套 = \'" & User.Group & "\' " \'一定要清除加载条件 t.load() End If End Select Next If User.Group = "全部" DataTables("租户合同台账").loadFilter = "" \'一定要清除加载条件 DataTables("租户合同台账").load() Else DataTables("租户合同台账").loadFilter = "账套 = \'" & User.Group & "\' " \'一定要清除加载条件 DataTables("租户合同台账").load() End If For Each t1 As Table In Tables t1.Visible = True t1.AllowEdit = True For Each c As Col In t1.Cols c.Visible = True c.AllowEdit = True Next Next Tables("授权表").Visible = (User.Roles = "管理员") If User.Type = UserTypeEnum.User Then \' msgbox(User.Type & "=" & UserTypeEnum.User ) For Each dr As DataRow In DataTables("授权表").Select("角色名 like \'" & User.Roles & "\'" ) If dr.Isnull("表名") Then If dr.IsNull("列名") Then Else For Each t2 As Table In Tables If t2.Cols.Contains(dr("列名")) Then t2.Cols(dr("列名")).Visible = Not dr("不可见") t2.Cols(dr("列名")).AllowEdit = Not dr("不可编辑") End If Next End If Else If dr.IsNull("列名") Then Tables(dr("表名")).Visible = Not dr("不可见") Tables(dr("表名")).AllowEdit = Not dr("不可编辑") Else Tables(dr("表名")).Cols(dr("列名")).Visible = Not dr("不可见") Tables(dr("表名")).Cols(dr("列名")).AllowEdit = Not dr("不可编辑") End If End If Next End If Tables("业主合同信息.房间台账").Visible = False Tables("业主合同信息.业主押金").Visible = False Tables("业主合同信息.业主账单").Visible = False Tables("房间台账.定金违约").Visible = False Tables("房间台账.水电燃有线").Visible = False Tables("房间台账.租户账单").Visible = False Tables("租户合同台账.租户押金").Visible = False Tables("租户合同台账.水电燃有线").Visible = False Tables("配货台账.配货流转").Visible = False Tables("租户合同台账.房间台账").Visible = False Tables("租户合同台账.租户账单").Visible = False Tables("业主合同信息.业主生活物品").Visible = False Tables("房间台账.配货台账").Visible = False If user.Group <> "全部" Then With Tables("房屋业绩") Dim dr1 As DataRow dr1 = DataTables("房屋业绩").Find("日期 = \'" & Date.Today.AddDays(-1) & "\'and 账套 = \'" & user.Group & "\'") If dr1 Is Nothing Then \'如果找到的话 For Each dr As DataRow In DataTables("业主合同信息").DataRows \'Dim dr As Row \'dr = Tables("业主合同信息").Current If dr("合同状态") <> "已终止" And dr("合同状态") <> "已续租" Then .AddNew() .Current("日期") = Date.Today.AddDays(-1) \'output.show(1) .Current("台账号") = dr("台账号") \'output.show(2) .Current("区域") = dr("区域") .Current("房间号") = dr("房间号") .Current("共几间") = dr("共几间") .Current("差价") = dr("差价") .Current("空置间数") = dr("空置间数") \'output.show(3) .Current("配货") = DataTables("配货流转").Compute("sum(单价)","现台账号 = \'" & dr("台账号") & "\' and 制单日期 = \'" & Date.Today.AddDays(-1) & "\'") \'output.show(4) .Current("维修") = DataTables("报修工单").Compute("sum(维修件单价)","台账号 = \'" & dr("台账号") & "\' and 制单日期1 = \'" & Date.Today.AddDays(-1) & "\'") \'output.show(5) .Current("装修") = DataTables("外联装修维修").Compute("sum(金额)","台账号 = \'" & dr("台账号") & "\' and 制单日期 = \'" & Date.Today.AddDays(-1) & "\'") \'output.show(6) .Current("易耗品") = DataTables("易耗品出库").Compute("sum(配件金额)","台账号 = \'" & dr("台账号") & "\' and 制单日期 = \'" & Date.Today.AddDays(-1) & "\'") \'output.show(7) .Current("水电燃") = DataTables("水电燃有线").Compute("sum(金额)","项目说明 = \'公司支付\' and 台账号 = \'" & dr("台账号") & "\' and 制单日期 = \'" & Date.Today.AddDays(-1) & "\'") \'output.show(8) .Current("其他") = DataTables("现金银行帐").Compute("sum(支出)","业主合同号 = \'" & dr("合同号") & "\' and 制单日期 = \'" & Date.Today.AddDays(-1) & "\' and 类别 = \'业主\' and 明细科目 = \'日常\' and 摘要 <> \'水费\' and 摘要 <> \'电费\' and 摘要 <> \'燃气费\' ") + _ DataTables("现金银行帐").Compute("sum(支出)","业主合同号 = \'" & dr("合同号") & "\' and 制单日期 = \'" & Date.Today.AddDays(-1) & "\' and 类别 = \'业主\' and 明细科目 = \'维修费\' and 摘要 <> \'业主承担垫付\' ") End If Next End If End With End If 全局表的beforeload里: Dim t As DataTable t = e.DataTable Select Case t.Name Case "分类项目表","节假日","系统数据设置","授权表" t.loadFilter = "" \'一定要清除加载条件 t.load() Case "现金银行帐" If User.Group = "全部" t.loadFilter = "" \'一定要清除加载条件 t.loadTop = 20 t.loadPage =t.TotalPages - 1 t.load() Else t.loadFilter = "账套 = \'" & User.Group & "\' " \'一定要清除加载条件 t.loadTop = 20 t.loadPage = t.TotalPages - 1 t.load() End If Case Else If User.Group = "全部" t.loadFilter = "" \'一定要清除加载条件 t.load() Else t.loadFilter = "账套 = \'" & User.Group & "\' " \'一定要清除加载条件 t.load() End If End Select If User.Type = UserTypeEnum.User Then \' msgbox(User.Type & "=" & UserTypeEnum.User ) For Each dr As DataRow In DataTables("授权表").Select("角色名 like \'" & User.Roles & "\'" ) If dr.Isnull("表名") Then If dr.IsNull("列名") Then Else For Each t2 As Table In Tables If t2.Cols.Contains(dr("列名")) Then t2.Cols(dr("列名")).Visible = Not dr("不可见") t2.Cols(dr("列名")).AllowEdit = Not dr("不可编辑") End If Next End If Else If dr.IsNull("列名") Then Tables(dr("表名")).Visible = Not dr("不可见") Tables(dr("表名")).AllowEdit = Not dr("不可编辑") Else Tables(dr("表名")).Cols(dr("列名")).Visible = Not dr("不可见") Tables(dr("表名")).Cols(dr("列名")).AllowEdit = Not dr("不可编辑") End If End If Next End If 全局表的startedit里 Dim r As Row = e.Table.Current If r.DataRow.RowState = DataRowState.Added Then \'新增行正常编辑 Return End If If QQClient.Ready = False Then \'如果QQClient没有启动,则禁止编辑 PopMessage("必须启动QQClient,才能编辑此表数据!","提示",PopIconEnum.Infomation,5) e.Cancel = True Return End If Dim key As String = e.Table.DataTable.Name & ":" & r("_Identify") If tbrk.Contains(key) Then \'如果本人之前已经编辑此行,则正常编辑 Return Else \'如果本人之前没有编辑此行 Dim msg = QQClient.SendWait("?#" & Key & "#?",5) \'向服务器发送请求编辑信息 If msg = "OK" Then \'如果服务器返回OK tbrk.Add(key) \'在本地登记正在编辑此行 ElseIf msg > "" Then \'否则显示服务器返回的信息,并取消编辑 PopMessage("无法编辑此行,因为:" & vbcrlf & msg ,"提示",PopIconEnum.Infomation,5) e.Cancel = True Else \'如果服务器没有返回信息,则取消编辑 PopMessage("因服务器无响应,无法编辑此行!" ,"提示",PopIconEnum.Infomation,5) e.Cancel = True End If End If |
-- 作者:有点甜 -- 发布时间:2019/4/28 14:22:00 --
把你上面的代码全部注释掉,然后测试是否还存在对应的问题。
|