If e.DataCol.Name = "工程代号" Dim dr As DataRow Dim Filter As String dr = DataTables("委托台账").Find( "工程代号 = '" & e.DataRow("工程代号") & "'") If dr IsNot Nothing Then For Each dc As DataCol In e.DataTable.datacols If dc.name <> "编号" Then e.DataRow(dc.name) = dr(dc.name) End If Next Else For Each dc As DataCol In e.DataTable.datacols If dc.name <> "编号" Then e.DataRow(dc.name) = Nothing end if next End If End If
|