以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]添加  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=127184)

--  作者:江南小镇
--  发布时间:2018/11/7 19:18:00
--  [求助]添加
 老师好,我想把当前表的列行的单元格中的字段添加到另外表的列中该列中的字段不充分(无条件添加)
--  作者:有点甜
--  发布时间:2018/11/7 19:54:00
--  

具体一点你的问题,最好有时里或者截图说明,说明要做到的效果。


--  作者:江南小镇
--  发布时间:2018/11/7 20:28:00
--  
老师,我不要根据逻辑列来复制摘要字段。如果摘要列输入字段列表项目表的摘要列就添加该字段列表项目表禁止重复。



,If e.DataCol.Name = "审核" AndAlso e.DataRow("审核") = True Then
    Dim nma() As String = {"摘要"} \'A表数据来源列
    Dim nmb() As String = {"摘要"} \'B表数据接收列
    Dim dr As DataRow = DataTables("列表项目").AddNew
    For i As Integer = 0 To nma.Length - 1
        dr(nmb(i)) = e.DataRow(nma(i))
    Next
End If

--  作者:有点甜
--  发布时间:2018/11/7 21:38:00
--  

参考

 

http://www.foxtable.com/webhelp/scr/2490.htm

 

 


--  作者:江南小镇
--  发布时间:2018/11/7 21:46:00
--  
 老师,没有关联列。这样可以吗?
Select Case e.DataCol.name
    Case "_Identify"
        Dim dr As DataRow = DataTables("列表项目").Find("_Identify = \'" & e.OldValue & "\'")
        If dr Is Nothing Then
            dr = DataTables("列表项目").AddNew()
            dr("摘要") = e.DataRow("摘要")
           
        Else
            dr("_Identify") = e.DataRow("_Identify")
        End If
    Case "摘要","摘要"
        Dim dr As DataRow = DataTables("列表项目").Find("_Identify = \'" & e.DataRow("_Identify") & "\'")
        If dr IsNot Nothing Then
            dr(e.DataCol.Name) = e.DataRow(e.DataCol.Name)
        End If
End Select

--  作者:有点甜
--  发布时间:2018/11/7 22:05:00
--  

改成

 

Select Case e.DataCol.name
    Case "摘要"
        Dim dr As DataRow = DataTables("列表项目").Find("摘要 = \'" & e.OldValue & "\'")
        If dr Is Nothing Then
            dr = DataTables("列表项目").AddNew()
            dr("摘要") = e.DataRow("摘要")
        Else
            dr("摘要") = e.DataRow("摘要")
        End If
       
End Select


--  作者:江南小镇
--  发布时间:2018/11/7 23:24:00
--  
老师,列表项目表摘要列的字段不置顶中间有空白行。





图片点击可在新窗口打开查看此主题相关图片如下:图像 123.png
图片点击可在新窗口打开查看
[此贴子已经被作者于2018/11/8 6:14:28编辑过]

--  作者:有点甜
--  发布时间:2018/11/8 8:43:00
--  
Select Case e.DataCol.name
    Case "摘要"
        Dim dr As DataRow = DataTables("列表项目").Find("摘要 = \'" & e.OldValue & "\'")
        If dr Is Nothing Then
            dr = DataTables("列表项目").Find("摘要 is null")
            If dr Is Nothing Then dr = DataTables("列表项目").AddNew()
            dr("摘要") = e.DataRow("摘要")
        Else
            dr("摘要") = e.DataRow("摘要")
        End If
       
End Select