DataTables("月租收费_Table1").DeleteFor("[车牌号码] is null ")
For Each dt As DataRow In DataTables("批量勾选_Table1").Select("[车牌号码] is not null")
If dt("勾选") = True Then
Dim r As DataRow = DataTables("月租收费_Table1").Find("[车牌号码] = '" & dt("车牌号码") & "'")
If r Is Nothing Then
r = DataTables("月租收费_Table1").addnew
End If
r("住址_序号") = dt("住址_序号")
r("住址_巷") = dt("住址_巷")
r("住址_号") = dt("住址_号")
r("住址_房") = dt("住址_房")
r("姓名") = dt("姓名")
r("固定电话") = dt("固定电话")
r("手机号码") = dt("手机号码")
r("车牌号码") = dt("车牌号码")
r("备注") = dt("备注")
End If
End If
Next
If DataTables("月租收费_Table1").DataRows.Count < 10 Then
Dim i As Integer = 10 - DataTables("月租收费_Table1").DataRows.Count
DataTables("月租收费_Table1").AddNew(i)
End If
e.Form.Close()