Dim Values As String() = {"(订单号)","(生产单号)","(计划数量)","(计划日期)"}
For Each Va as string In Values
with e.form
if .Controls(va).value Is Nothing then
MessageBox.Show(va &" 资料不全,请录入!", "提示")
end if
end with
Next
Dim dr As DataRow
dr = DataTables("计划目录").Find("[图号] = '" & currenttable.current("图号") & "'")
If dr Is Nothing Then
dim f As New Filler
f.SourceTable = DataTables("产品目录") '指定数据来源
f.SourceCols = "客户,机型,图号,名称,材料,重量,材料费" '指定数据来源列
f.DataTable = DataTables("计划目录") '指定数据接收表
f.DataCols = "客户,机型,图号,名称,材料,重量,材料费" '指定数据接收列
f.Filter = "[图号] = '" & currenttable.current("图号") & "'"
f.Fill() '填充数据
end if
dr = DataTables("计划工序").Find("[图号] = '" & currenttable.current("图号") & "'")
If dr Is Nothing Then
dim f As New Filler
f.SourceTable = DataTables("产品工序") '指定数据来源
f.SourceCols = "图号,名称,序号,工作中心,加工提示,备注" '指定数据来源列
f.DataTable = DataTables("计划工序") '指定数据接收表
f.DataCols = "图号,名称,序号,工作中心,加工提示,备注" '指定数据接收列
f.Filter = "[图号] = '" & currenttable.current("图号") & "'"
f.Fill() '填充数据
end if
dr = DataTables("计划工艺").Find("[图号] = '" & currenttable.current("图号") & "'")
If dr Is Nothing Then
dim f As New Filler
f.SourceTable = DataTables("产品工艺") '指定数据来源
f.SourceCols = "图号,名称,序号,工作中心,工艺序号,加工内容,准备工时,标准工时" '指定数据来源列
f.DataTable = DataTables("计划工艺") '指定数据接收表
f.DataCols = "图号,名称,序号,工作中心,工艺序号,加工内容,准备工时,标准工时" '指定数据接收列
f.Filter = "[图号] = '" & currenttable.current("图号") & "'"
f.Fill() '填充数据
end if
for n as integer = 0 to tables("计划工艺").count-1
if tables("计划工艺").rows(n)("图号") = tables("产品目录").current("图号")
tables("计划工艺").rows(n)("订单号") = Forms("生产计划").Controls("(订单号)").text
end if
next
没有提示任何信息~