Dim t1 As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim t2 As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim s As String = ""
If t1.text(0) = "0" Then
s = "0"
End If
Dim ndr As DataRow
If val(t2.text) >= 1
ndr = DataTables("发票管理").AddNew
ndr("发票号码") = s & val(t1.text)
ndr("领用日期") = e.Form.Controls("DateTimePicker1").Text
End If
For i As Integer = 2 To val(t2.text)
ndr = DataTables("发票管理").AddNew
ndr("发票号码") = s & val(t1.text) + i - 1
Next