Dim Cols1() As String = {"订货日期","客户名称","订单号","产品型号","产品名称","产品规格","产品颜色","数量","金额","已发货","备注"}
Dim Cols2() As String = {"订货日期","客户名称","订单号","产品型号","产品名称","产品规格","产品颜色","数量","金额","已发货","备注"}
Dim dhrq As String = e.Form.Controls("ComboBox1").text
'e.Form.Controls("ComboBox1").Value
For Each dr1 As DataRow In DataTables("订单明细表").select("订单号 = '" & dhrq & "'")
Dim dr2 As DataRow = DataTables("订单表").AddNew()
For i As Integer = 0 To Cols1.Length -1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
Next
MainTable= Tables("订单表")
[此贴子已经被作者于2012-6-23 9:24:40编辑过]