Foxtable(狐表)用户栏目专家坐堂 → [求助]BuildTree


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

主题:[求助]BuildTree

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


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

1、For Each dt1 As DataRow In DataTables("岗位执行操作维护表").SQLSelect("")
   
    If   dt1("表名") = "资源不准确整改清单表"  And dt1("工作岗位") = "内线归档组"  And dt1("执行类型") = "按钮【加载数据】1"   Then
        Dim str1 = dt1("列表项目1")
       
       
        Dim nstr1 As String = " 系统编号 Is Null Or ( ( " '手工增加内容
        For Each s1 As String In str1.split("/") '把查询到的内容按"/"进行分割
            nstr1 &= " 工单类型 = '" & s1 & "' or " '把分割后的内容按 区域 = '' or 进行填写
        Next
        nstr1 = nstr1.substring(0, nstr1.length-3) & ") " '删除分割后内容的后面3个字符.并且增加符号")"
       
        msgbox(nstr1)
    End If
   
   
    If   dt1("表名") = "资源不准确整改清单表"  And dt1("工作岗位") = "内线归档组"  And dt1("执行类型") = "按钮【加载数据】2"   Then
        Dim str2 = dt1("列表项目1")
        Dim nstr2 As String = "And ("
        For Each s2 As String In str2.split("/")
            nstr2 &= " 工单当前环节 = '" & s2 & "' or "
        Next
        nstr2 = nstr2.substring(0, nstr2.length-3) & "))"
       
        msgbox(nstr2)
       
    End If
Next

2、具体实例发上来测试

 

 


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


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

For Each dt1 As DataRow In DataTables("岗位执行操作维护表").SQLSelect("")
   
   
    Dim nstr1 As String = " 系统编号 Is Null Or ( ( " '手工增加内容
    If   dt1("表名") = "资源不准确整改清单表"  And dt1("工作岗位") = "内线归档组"  And dt1("执行类型") = "按钮【加载数据】1"   Then
        Dim str1 = dt1("列表项目1")
       
       
        For Each s1 As String In str1.split("/") '把查询到的内容按"/"进行分割
            nstr1 &= " 工单类型 = '" & s1 & "' or " '把分割后的内容按 区域 = '' or 进行填写
        Next
        nstr1 = nstr1.substring(0, nstr1.length-3) & ") " '删除分割后内容的后面3个字符.并且增加符号")"
       
        msgbox(nstr1)
    End If
   
    Dim nstr2 As String = "And ("
    If   dt1("表名") = "资源不准确整改清单表"  And dt1("工作岗位") = "内线归档组"  And dt1("执行类型") = "按钮【加载数据】2"   Then
        Dim str2 = dt1("列表项目1")
       
        For Each s2 As String In str2.split("/")
            nstr2 &= " 工单当前环节 = '" & s2 & "' or "
        Next
        nstr2 = nstr2.substring(0, nstr2.length-3) & "))"
       
        msgbox(nstr2)
       
    End If
    If nstr2 <> "And (" Then
        msgbox(nstr1 & nstr2)
        Exit For
    End If
Next

 回到顶部