以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  如何批量添加明细  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=86429)

--  作者:地瓜
--  发布时间:2016/6/17 11:07:00
--  如何批量添加明细
如截图所示,如何批量添加明细表的记录,谢谢!
图片点击可在新窗口打开查看此主题相关图片如下:批量添加明细.jpg
图片点击可在新窗口打开查看

--  作者:大红袍
--  发布时间:2016/6/17 11:25:00
--  

 参考

 

http://www.foxtable.com/help/topics/1776.htm

 

http://www.foxtable.com/help/topics/1533.htm

 

 


--  作者:地瓜
--  发布时间:2016/6/17 16:14:00
--  
在后头数据里发现可以实现了批量添加,但是“评审编号”就没有自动填充下来了
图片点击可在新窗口打开查看此主题相关图片如下:批量添加明细缺编号.jpg
图片点击可在新窗口打开查看
同时,在窗体中“评审明细”也没有即时显示刚才所添加的明细
图片点击可在新窗口打开查看此主题相关图片如下:批量添加明细缺即时刷新.jpg
图片点击可在新窗口打开查看。谢谢!

--  作者:大红袍
--  发布时间:2016/6/17 17:46:00
--  

你要给那一列赋值吧?如代码

 

新增的行("评审编号") = Tables("采购评审").Current("评审编号")

 

----------------

 

或者是,新增行直接写

 

Dim nr As Row = Tables("tblcgps.tblcgpsmx").AddNew


--  作者:地瓜
--  发布时间:2016/6/20 10:54:00
--  
 是这样的代码吗?
Dim Cols1() As String = {"cgdw","dwlb","sz","szlb","jysm","sl","pmmc","pmlb","czxzj","wjbh","zjje","zczjly","jehj"}
Dim Cols2() As String = {"cgdw","dwlb","sz","szlb","jysm","sl","pmmc","pmlb","czxzj","wjbh","zcje","zczjly","jehj"}
For Each dr1 As DataRow In DataTables("tblcgzllc").Select("[zt] = \'待评审\' ")
    Dim dr2 As DataRow = DataTables("tblcgpsmx").AddNew()
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
        Tables("tblcgps.tblcgpsmx").Current("psID")=Tables("tblcgps").Current("psID")
    Next
Next

--  作者:大红袍
--  发布时间:2016/6/20 10:57:00
--  
Dim Cols1() As String = {"cgdw","dwlb","sz","szlb","jysm","sl","pmmc","pmlb","czxzj","wjbh","zjje","zczjly","jehj"}
Dim Cols2() As String = {"cgdw","dwlb","sz","szlb","jysm","sl","pmmc","pmlb","czxzj","wjbh","zcje","zczjly","jehj"}
For Each dr1 As DataRow In DataTables("tblcgzllc").Select("[zt] = \'待评审\' ")
    Dim dr2 As Row = Tables("tblcgps.tblcgpsmx").AddNew
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next
Next
--  作者:qctv
--  发布时间:2022/2/21 23:22:00
--  
学习了