Select Case e.DataCol.Name
Case "订单号","数量","已提数量"
If e.DataRow.IsNull("订单号") = False AndAlso e.DataRow.IsNull("数量") = False AndAlso e.DataRow.IsNull("已提数量") = False Then '如果已经输入订单编号
If e.DataRow.GetChildRows("订单出库明细表").Count = 0 Then '而且无订单出库明细
Dim r1 As DataRow = DataTables("订单出库明细表").AddNew()
r1("订单号") = e.DataRow("订单号")
r1("提货日期") = Date.Today
r1("数量") = e.DataRow("数量")
r1("已提数量") = e.DataRow("已提数量")
r1.Save()
End If
End If
End Select