If e.Form.controls("TextBox1").value = "" Then
MessageBox.Show("请录入厂商名称!", "提示", MessageBoxButtons.Ok, MessageBoxIcon.Information)
Return
End If
DataTables("销售表").StopRedraw
For Each r As Row In e.Form.Controls("Table1").Table.Rows 'e.Form.Controls("Table1").Table.addnew
Dim dr As DataRow = DataTables("销售表").AddNew()
dr("客户") = Trim(e.Form.controls("TextBox1").value)
dr("日期") = Trim(e.Form.controls("TextBox2").value)
dr("单号") = Trim(e.Form.controls("TextBox3").value)
dr("货物编号")=r("货物编号")
dr("货物名称")=r("货物名称")
dr("规格")=r("规格")
dr("数量")=r("数量")
dr("单价")=r("单价")
dr("金额")=r("金额")
Next
DataTables("销售表").Save()
DataTables("销售表").ResumeRedraw