以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  关于目录树问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=16349)

--  作者:wangliang
--  发布时间:2012/2/10 14:27:00
--  关于目录树问题

有这么一个目录树窗口(当中包括厂区|部门|业务员|类型)四个结点,现在有个核算单位的下拉窗口,当类型不空时,核算单位=类型,当类型为空时,核算单位=厂区,以下的代码错在哪里

if e.node.level=3 Then
 Dim ps() As String = e.node.fullpath.split("\\")
 Dim tr As Row =Tables("客户表").current
 Dim dr As DataRow =DataTables("厂区").find("厂区=\'" & ps(0) & "\' And 部门 = \'" & ps(1) & "\' and  业务员 =\'"& ps(2) &"\' and 类型=\'"& ps(3) & "\'") 
  If dr IsNot Nothing Then
  tr("核算单位")=dr("类型")
   Else tr("核算单位")=dr("厂区")
    e.form.dropdownbox.value=tr("核算单位")
  End If
 e.form.dropdownbox.closedropdown()
End If


--  作者:狐狸爸爸
--  发布时间:2012/2/10 14:35:00
--  

设置在NodeMouseClick或者NodeMouseDoubleClick事件。

看看这个例子:

http://www.foxtable.com/help/topics/2350.htm


 


--  作者:wangliang
--  发布时间:2012/2/10 14:59:00
--  

但是好象没有我想实现的功能


--  作者:狐狸爸爸
--  发布时间:2012/2/10 15:42:00
--  
用例子说话
--  作者:wangliang
--  发布时间:2012/2/10 15:55:00
--  

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:面积问题.table

在核算单位那里,当选着龙田厂区或则江阴厂区的时候,核算单位就是这两个

 


--  作者:狐狸爸爸
--  发布时间:2012/2/10 16:15:00
--  

If e.node.level=3 Then
    Dim ps() As String = e.node.fullpath.split("\\")
    Dim tr As Row =Tables("客户表").current
    Dim dr As DataRow =DataTables("厂区").find("厂区=\'" & ps(0) & "\' And 部门 = \'" & ps(1) & "\' and  业务员 =\'"& ps(2) &"\' and 类型=\'"& ps(3) & "\'")
    If dr.IsNull("类型") = False Then
        e.form.dropdownbox.value = dr("类型")
    Else
        e.form.dropdownbox.value = dr("厂区")
    End If
    e.form.dropdownbox.closedropdown()
End If


--  作者:wangliang
--  发布时间:2012/2/11 8:21:00
--  

试过了还是不行