Foxtable(狐表)用户栏目专家坐堂 → 目录树选择问题


  共有2602人关注过本帖树形打印复制链接

主题:目录树选择问题

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/9/10 20:41:00 [显示全部帖子]

Dim t As Table = Tables("表a")

If e.node.Level > 0 Then
    Dim filter As String = ""
    Dim dr As DataRow = e.Node.DataRow
    If dr("分组") = "按分组" Then
        If e.Node.Level = 1 Then
            filter = "省 = '" & dr("省") & "'"
        Else If e.Node.Level = 2 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "'"
        Else If e.Node.Level = 3 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "'"
        Else If e.Node.Level = 4 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "' and 乡镇 = '" & dr("乡镇") & "'"
        Else If e.Node.Level = 5 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "' and 乡镇 = '" & dr("乡镇") & "' and 街道居委 = '" & dr("街道居委") & "'"
        End If
        filter = "客户分组 in ('" & DataTables("客户分组").GetComboListString("街道居委", filter).Replace("|", "','") & "')"
        t.Filter = filter
       
    Else If dr("分组") = "按等级" Then
        filter = "客户等级 = '" & dr("省") & "'"
        t.Filter = filter
    End If
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/9/11 9:26:00 [显示全部帖子]

Dim t As Table = Tables("表a")
Dim dr As DataRow = e.Node.DataRow

If e.node.Level =0 Then
    t.Filter = ""
    e.Node.Text = dr("分组") & "(" & t.Rows.Count & ")"
Else
    Dim filter As String = ""   
    If dr("分组") = "按分组" Then
        If e.Node.Level = 1 Then
            filter = "省 = '" & dr("省") & "'"
        Else If e.Node.Level = 2 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "'"
        Else If e.Node.Level = 3 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "'"
        Else If e.Node.Level = 4 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "' and 乡镇 = '" & dr("乡镇") & "'"
        Else If e.Node.Level = 5 Then
            filter = "省 = '" & dr("省") & "' and 市 = '" & dr("市") & "' and 区县 = '" & dr("区县") & "' and 乡镇 = '" & dr("乡镇") & "' and 街道居委 = '" & dr("街道居委") & "'"
        End If
        filter = "客户分组 in ('" & DataTables("客户分组").GetComboListString("街道居委", filter).Replace("|", "','") & "')"
        t.Filter = filter
       
    Else If dr("分组") = "按等级" Then
        filter = "客户等级 = '" & dr("省") & "'"
        t.Filter = filter
    End If
    Dim idx As Integer = e.Node.Text.IndexOf("(")
    If idx > -1 Then
        e.Node.Text = e.Node.Text.SubString(0, idx) & "(" & t.Rows.Count & ")"
    Else
        e.Node.Text = e.Node.Text & "(" & t.Rows.Count & ")"
    End If
End If


 回到顶部