Dim Cols1() As String = {"日期","单号","供应商","物料编码","货物名称","规格","单位","数量","结算单价","结算金额","会计年度","单据类型"}
Dim Cols2() As String = {"入库日期","单号","供应商","物料编码","货物名称","规格","单位","数量","含税单价","含税金额","会计年度","单据类型"}
For Each dr1 As DataRow In DataTables("已审采购").Select("[选择] = True and [fa piao凭证] is null")
Dim dr2 As DataRow = DataTables("采购明细").AddNew()
dr1("fa piao凭证") = "进项fa piao数据采购"
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("把已选择及fa piao未核销的数据复制到采购明细了", "提示", MessageBoxButtons.Ok, MessageBoxIcon.Information)
For Each dr1 As DataRow In DataTables("已审采购").Select("[选择] = True and [fa piao凭证] is null") 把这个改为当前表怎样改,现在一点把没有加载的都过过去了