老师,标注红色的是一个窗口表,我想把这个窗口表里选中的复制到指定的表中,帮忙看下可以怎么改呢?谢谢
Dim Cols1() As String = {"挂标日期", "生产批次", "成品编码", "成品描述", "优先顺序", "材料编码", "材料描述", "规格型号", "挂标数量", "加工工序", "加工内容", "库位", "备注"}
Dim Cols2() As String = {"挂标日期", "生产批次", "成品编码", "成品描述", "优先顺序", "材料编码", "材料描述", "规格型号", "挂标数量", "加工工序", "加工内容", "库位", "备注"}
For Each dr1 As DataRow In DataTables("配件需求明细_明细查询").Select("")
Dim dr2 As DataRow = DataTables("欠料分析明细").AddNew()
For i As Integer = 0 To Cols1.Length - 1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
Next
DataTables("配件需求明细_明细查询").Save()
DataTables("欠料分析明细").Save()
我只想把选中的行插入进去, 这个是当前窗口中所有行都会插入进去。如图
For Each dr1 As DataRow In DataTables("配件需求明细_明细查询").Select("")
此主题相关图片如下:2.png