Dim sts() As String = {"临调销售单号","临调日期","仓库","项目名称","购货单位","销售类型"}
For Each st As String In sts
If Tables("临调销售").Current.isnull(st) = True Then
MessageBox.Show("请将红色必填字段填写完整!","提醒")
Return
End If
Next
For Each r As Row In Tables("临调采购明细").GetCheckedRows
Dim r1 As Row = Tables("临调销售明细").AddNew
Dim r2 As Row = Tables("临调销售").Current
r1("临调销售单号") = r2("临调销售单号")
r1("货物名称") = r("货物名称")
r1("规格型号") = r("规格型号")
r1("材质") = r("材质")
r1("长度") = r("长度")
r1("产地") = r("产地")
r1("临调销售_数量") = r("临调采购_数量")
r1("临调销售_单价") = r("临调采购_单价")
r1("计量单位") = r("计量单位")
r1("货物编号") = r("货物编号")
r1("临调采购单号") = r("临调采购单号")
Next
If MessageBox.Show("是否核销?核销后将不出现在列表里","请确认",MessageBoxButtons.YesNo,MessageBoxIcon.Question) = DialogResult.Yes Then
Tables("临调采购明细").Current("核销") = True
Tables("临调采购明细").Current.save
DataTables("临调采购明细").loadfilter = "核销 = false"
DataTables("临调采购明细").load()
End If
临调采购明细选择多条数据可以复制到临调销售明细,核销完的只有一条,应该是多条一起核销,不晓得代码哪有问题,改了几次没成功