以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  清空表代码怎么编写?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=179365)

--  作者:农民工组长
--  发布时间:2022/8/20 10:58:00
--  清空表代码怎么编写?
Dim Cols1() As String = {"序号", "名称", "图号", "单套数量"}
Dim Cols2() As String = {"序号", "名称", "图号", "单套数量"}
Dim chk As WinForm.CheckBox
chk = Forms("产品拆分").Controls("chk")
If chk.Checked = True Then
    For Each dr1 As DataRow In DataTables("产品拆分表").Select("[序号]is not null")
    Dim dr2 As DataRow = DataTables("产品清单").AddNew()
        For i As Integer = 0 To Cols1.Length - 1
            dr2(Cols2(i)) = dr1(Cols1(i))
        Next
    Next
Else
    chk.Checked = False
    这里添加清空产品订单表的内容
    
End If

--  作者:有点蓝
--  发布时间:2022/8/20 11:01:00
--  
http://www.foxtable.com/webhelp/topics/0394.htm

DataTables("订单").DeleteFor("")