以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  当前表过帐  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=153301)

--  作者:zhuxinhui
--  发布时间:2020/8/6 15:44:00
--  当前表过帐

Dim Cols1() As String = {"日期","单号","供应商","物料编码","货物名称","规格","单位","数量","结算单价","结算金额","会计年度","单据类型"}
Dim Cols2() As String = {"入库日期","单号","供应商","物料编码","货物名称","规格","单位","数量","含税单价","含税金额","会计年度","单据类型"}
For Each dr1 As DataRow In DataTables("已审采购").Select("[选择] = True and [发票凭证] is null")
     Dim dr2 As DataRow = DataTables("采购明细").AddNew()
         dr1("发票凭证") = "进项发票数据采购"
     For i As Integer = 0 To Cols1.Length -1
         dr2(Cols2(i)) = dr1(Cols1(i))
     Next
Next
DataTables("已审销售").Save()
DataTables("采购明细").Save()
DataTables("采购明细").deletefor("[含税金额] Is null OR [含税金额] = 0")
MessageBox.Show("把已选择及发票未核销的数据复制到采购明细了", "提示", MessageBoxButtons.Ok, MessageBoxIcon.Information)


For Each dr1 As DataRow In DataTables("已审采购").Select("[选择] = True and [发票凭证] is null") 把这个改为当前表怎样改,现在一点把没有加载的都过过去了

--  作者:有点蓝
--  发布时间:2020/8/6 15:50:00
--  
当前表?currenttable?这个意思?

For Each dr1 As DataRow In currenttable.DataTable.Select("[选择] = True and [发票凭证] is null") 

--  作者:zhuxinhui
--  发布时间:2020/8/6 16:40:00
--  
已处理好了
现在是把没有加载都过到采购明细表,我只是想把过滤后的过到采购明细表