-- 作者:狐狸爸爸
-- 发布时间:2012/7/25 14:58:00
--
写代码从来就不是一个技术活,所以有“代码蓝领”之说。
你看看下面的代码,没有一点点技巧可言,全是最基础的:
Dim dr1 As datarow =Tables("表A") .Current.DataRow
Dim dr2 As Datarow = DataTables("表A").AddNew()
for each dc As DataRow in DataTables("表A").DataRows
dr2(dc.name) = dr1(dc.name)
Next
dr2("关联列") = “xxx”
For each dr3 s DataRow = dr1.GetChildRows()
Dim dr4 As DataRow = DataTables("表B").AddNew()
for each dc As DataRow in DataTables("表B").DataRows
dr4(dc.name) = dr4(dc.name)
Next
dr4("关联列") = “xxx”
Next
|