以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 目录树节点选择 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=135020) |
-- 作者:lfz123 -- 发布时间:2019/5/15 10:45:00 -- 目录树节点选择 我想选择节点的时候按照节点标题切换相应的视图,错误提示如下: 代码如下:(错误代码见黄色背景部分) If e.Node.Text = "上海赫程国际旅行社有限公司南通分公司" OrElse e.Node.ParentNode.Text = "上海赫程国际旅行社有限公司南通分公司" Then Tables("应收款明细").OpenView("携程视图") ElseIf e.Node.Text = "直联商户待清算款项" OrElse e.Node.ParentNode.Text = "直联商户待清算款项" Then Tables("应收款明细").OpenView("卡视图") End If Dim Filter As String Dim dr As DataRow = e.Node.DataRow \'获取生成此节点的行 If e.Node.Text <> "显示所有行" Then Select Case e.Node.Level Case 0 Filter = "[收款户名] = \'" & dr("收款户名") & "\'" Case 1 Filter = "[收款户名] = \'" & dr("收款户名") & "\' And [消帐码] = \'" & dr("消帐码") & "\'" Case 2 Filter = "[收款户名] = \'" & dr("收款户名") & "\' And [消帐码] = \'" & dr("消帐码") & "\' And [华住对账名称] = \'" & dr("华住对账名称") & "\'" Case 3 Filter = "[收款户名] = \'" & dr("收款户名") & "\' And [消帐码] = \'" & dr("消帐码") & "\' And [华住对账名称] = \'" & dr("华住对账名称") & "\'And [方式] = \'" & dr("方式") & "\'" Case 4 Filter = "[收款户名] = \'" & dr("收款户名") & "\' And [消帐码] = \'" & dr("消帐码") & "\' And [华住对账名称] = \'" & dr("华住对账名称") & "\'And [方式] = \'" & dr("方式") & "\'And [中介名称] = \'" & dr("中介名称") & "\'" Case 5 Filter = "[收款户名] = \'" & dr("收款户名") & "\' And [消帐码] = \'" & dr("消帐码") & "\' And [华住对账名称] = \'" & dr("华住对账名称") & "\'And [方式] = \'" & dr("方式") & "\'And [中介名称] = \'" & dr("中介名称") & "\'And [年份] = \'" & dr("年份") & "\'" Case 6 Filter = "[收款户名] = \'" & dr("收款户名") & "\' And [消帐码] = \'" & dr("消帐码") & "\' And [华住对账名称] = \'" & dr("华住对账名称") & "\'And [方式] = \'" & dr("方式") & "\'And [中介名称] = \'" & dr("中介名称") & "\'And [年份] = \'" & dr("年份") & "\'And [月份] = \'" & dr("月份") & "\'" End Select End If Tables("应收款明细").Filter = Filter |
-- 作者:有点甜 -- 发布时间:2019/5/15 11:06:00 -- If e.Node.Text = "上海赫程国际旅行社有限公司南通分公司" OrElse e.node.parentnode IsNot Nothing AndAlso e.Node.ParentNode.Text = "上海赫程国际旅行社有限公司南通分公司" Then Tables("应收款明细").OpenView("携程视图") ElseIf e.Node.Text = "直联商户待清算款项" OrElse e.node.parentnode IsNot Nothing AndAlso e.Node.ParentNode.Text = "直联商户待清算款项" Then Tables("应收款明细").OpenView("卡视图") End If |