以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  老师,我想增加多行,下面代码需要怎么更改呢?谢谢  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=129960)

--  作者:有点甜
--  发布时间:2019/1/9 17:05:00
--  

请具体说明你的问题。什么情况下增加多行?

 

Dim t As Table = Tables("成品入库_录入")
Dim cs() As String = {"单据类型","单据日期","操作类型","库位","生产批次","备注","入库数量","入库类型"}
Dim r As Row = t.current
If r Is Nothing Then
    Dim nr As Row = t.addnew
    Tables("成品入库_录入").current("单据类型") = "入库"
    Tables("成品入库_录入").current("入库数量") = 1
    Tables("成品入库_录入").current("库位") = "成品库"
Else
    For i As Integer = 1 To 3
        Dim nr As Row = t.addnew
        For Each c As String In cs
            nr(c) = r(c)
        Next
    Next

End If