出生证_入库表datacolchanged事件
Select Case e.DataCol.Name
Case "起始编号","终止编号"
If e.DataRow.IsNull("起始编号") = False AndAlso e.DataRow.IsNull("终止编号") = False
Dim p As String = e.DataRow("起始编号")(0)
Dim s1 As Long = e.DataRow("起始编号").substring(1)
Dim s2 As Long = e.DataRow("终止编号").substring(1)
Dim vas As List(Of String) = DataTables("出库明细").GetValues("首发出生证编号","首发出生证编号 >= '" & e.DataRow("起始编号") & "' and 首发出生证编号 <= '" & e.DataRow("终止编号") & "'")
Dim dr As DataRow
For i As Long = s1 To s2
If vas.Contains(p & i) = False Then
dr = DataTables("出库明细").AddNew
dr("首发出生证编号") = p & i
End If
Next
End If
End Select