Foxtable(狐表)用户栏目专家坐堂 → [求助]求助目录树授权问题


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

主题:[求助]求助目录树授权问题

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110582 积分:562806 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/9/1 14:36:00 [显示全部帖子]

Dim trv1 As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim trv2 As WinForm.TreeView = e.Form.Controls("TreeView2")
Dim nd1 As WinForm.TreeNode = trv1.SelectedNode
Dim nd2 As WinForm.TreeNode = trv2.SelectedNode
Dim dr As DataRow
Dim sl As Integer

If nd2.Level = 0 Then
    dr = DataTables("用户_授权").Find("父节点 = '"& e.Node.Name &"'")
ElseIf nd2.Level = 1 Then
    dr = DataTables("用户_授权").Find("父节点 = '"& e.Node.ParentNode.Name &"' and 子节点 = '"& e.Node.Name &"'")
End If
If dr IsNot Nothing Then
    dr("用户") = nd1.Text
End If

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110582 积分:562806 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/9/1 14:47:00 [显示全部帖子]

Dim trv1 As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim trv2 As WinForm.TreeView = e.Form.Controls("TreeView2")
Dim nd1 As WinForm.TreeNode = trv1.SelectedNode
Dim nd2 As WinForm.TreeNode = trv2.SelectedNode
Dim dr As DataRow
Dim sl As Integer

If nd2.Level = 0 Then
    dr = DataTables("用户_授权").Find("父节点 = '"& e.Node.Name &"'")
ElseIf nd2.Level = 1 Then
    dr = DataTables("用户_授权").Find("父节点 = '"& e.Node.ParentNode.Name &"' and 子节点 = '"& e.Node.Name &"'")
End If
If dr IsNot Nothing Then
    If dr("用户").contains(nd1.Text) = False
        dr("用户") = dr("用户")  & "," & nd1.Text
    End If
End If

 回到顶部