以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  按钮的原来的代码如下  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=69298)

--  作者:jinzhengbe
--  发布时间:2015/6/2 17:35:00
--  按钮的原来的代码如下


图片点击可在新窗口打开查看此主题相关图片如下:捕获.png
图片点击可在新窗口打开查看
按钮的原来的代码如下

要与下面的内容在同一列  劳烦指点一下,非常感谢!!!!!

 

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
        Next
    End If
End With
DataTables("bell").save()


--  作者:大红袍
--  发布时间:2015/6/2 17:37:00
--  
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()