Foxtable(狐表)用户栏目专家坐堂 → [求助] 灵活数据匹配问题


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

主题:[求助] 灵活数据匹配问题

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


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

For Each r As Row In Tables("灵活批量数据匹配表").Rows
    Dim dr As DataRow = DataTables(e.Form.Controls("目标表").text).Find(e.Form.Controls("目标表条件").text & "  = '" & r(e.Form.Controls("本表条件").text) & "' ")
    If dr IsNot Nothing Then
        Dim ary1() = e.Form.Controls("目标表内容").text.split(",")
        Dim ary2() = e.Form.Controls("修改内容").text.split(",")
        For i As Integer = 0 To ary1.length-1
            dr(ary1(i)) = r(ary2(i))
        Next
    End  If
Next

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


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

Dim ar1() = e.Form.Controls("目标表条件").text.split(",")
Dim ar2() = e.Form.Controls("本表条件").text.split(",")
For Each r As Row In Tables(""& e.Form.Controls("目标表").text &"").Rows
    Dim str As String = "1=1"
    For t As Integer = 0 To ar2.length-1
        str &= " and " & ar2(t) & "  = '" & r(ar1(t)) & "' "
    Next
    Dim dr As DataRow = DataTables("灵活批量数据匹配表").Find(str)
    If dr IsNot Nothing Then
        Dim ary1() = e.Form.Controls("目标表内容").text.split(",")
        Dim ary2() = e.Form.Controls( "修改内容").text.split(",")
        For i As Integer = 0 To ary1.length-1
            r(ary1(i)) = dr(ary2(i))
        Next
    End  If
Next

 回到顶部