Dim Cols1() As String = {"name","address","phone","phone1" } Dim Cols2() As String = {"name","address","phone1","phone2" } With Tables("user") If .TopPosition > -1 Then '如果选定区域包括数据行 For i As Integer = .TopPosition To .BottomPosition Dim r As Row = .Rows(i) Dim dr As DataRow = DataTables("bell").AddNew() For n As Integer = 0 To cols1.Length - 1 dr(Cols2(n)) = r(Cols1(n)) Next dr("单号列") = e.Form.Controls("TextBox1").Text Next End If End With DataTables("bell").save()
|