Select Case e.DataCol.Name
Case "序号"
If e.DataRow.IsNull("序号") = False Then '如果已经输入订单编号
If e.DataRow.GetChildRows("PersonalInformation").Count = 0 Then '而且无订单明细
Dim dr As DataRow = DataTables("PersonalInformation").AddNew()
if dr isnot nothing then
dr("序号") = e.DataRow("序号")
end if
End If
End If
End Select