Dim startno As String = e.Form.Controls("TextBox1").text
Dim endno As String = e.Form.Controls("TextBox2").text
Dim pfix As String = startno.SubString(0,9)
If DataTables("流量卡资料库").Find("流量卡号 >= '" & startno & "' and 流量卡号 <= '" & endno & "'") Is Nothing Then
Dim ka1 As Integer = val(startno.Replace(pfix,""))
Dim ka2 As Integer = val(endno.Replace(pfix,""))
For i As Integer = ka1 To ka2
Dim r As Row = Tables("流量卡资料库").AddNew
r("服务商") = e.Form.Controls("TextBox4").text
r("购买金额") = e.Form.Controls("TextBox3").text
r("流量卡号") = pfix & i
Next
Else
msgbox("已存在卡号")
End If