Foxtable(狐表)用户栏目专家坐堂 → [求助]复制数值不等于的0的相关内容到另一表代码


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

主题:[求助]复制数值不等于的0的相关内容到另一表代码

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


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

If e.DataCol.Name = "逻辑列名" AndAlso e.DataRow("逻辑列名") = True AndAlso e.DataRow("A1") <> 0 Then
    Dim nma() As String = {"A1","A2","A3","A4"} 'A表数据来源列
    Dim nmb() As String = {"B1","B2","B3","B4"} 'B表数据接收列
    Dim dr As DataRow = DataTables("表B").AddNew
    For i As Integer = 0 To nma.Length - 1
        dr(nmb(i)) = e.DataRow(nma(i))
    Next
End If

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


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

If e.DataCol.Name = "逻辑列名"
    If e.DataRow("逻辑列名") = True
        If e.DataRow("A1") <> 0 Then
            Dim nma() As String = {"A1","A2","A3","A4","_Identify"} 'A表数据来源列
            Dim nmb() As String = {"B1","B2","B3","B4", "第六列"} 'B表数据接收列
            Dim dr As DataRow = DataTables("表B").AddNew
            For i As Integer = 0 To nma.Length - 1
                dr(nmb(i)) = e.DataRow(nma(i))
            Next
        End If
    Else
        DataTables("表B").DeleteFor("第六列 = '" & e.DataRow("_Identify") & "'")
    End If
End If

 回到顶部