Dim nms() As String = {"学期","班级","身份证号","缴费日期","缴费金额","收款人"}
Dim t As Table = e.Form.controls("Table1").Table
For n As Integer = 1 To t.Rows.Count -1
Dim dr As DataRow = DataTables("缴餐费").SQLFind("学期 = '20181' And 身份证号 = '" & t.Rows(n)("身份证号") & "'")
If dr Is Nothing Then '如果不存在同编号的订单
dr = DataTables("缴餐费").AddNew()
End If
For Each c As String In nms
dr(c) = t.Rows(n)(c)
Next
dr.saveNext