Dim drs2 As List(of DataRow)
Dim id As integer
For id = 6011 To 6026
drs2 = DataTables("光功率管理").Select("[网元ID] = id") 老师 我这里想要循环取出值,但是提示未找到列【id】![dvubb 图片点击可在新窗口打开查看](images/emot/em58.gif)
If drs2.count > Tables("表A").rows.count Then
Tables("表A").addnew(drs2.count-Tables("表A").rows.count)
End If
For i As Integer = 0 To drs2.count-1
Dim nr2 As Row = Tables("表A").rows(i)
Dim dr2 As DataRow = drs2(i)
nr2("第一列") = dr2("网元ID")
nr2("第二列") = dr2("子架ID").substring(dr2("子架ID").length - 2)
nr2("第三列") = dr2("单板名称")
nr2("第四列") = dr2("端口")
nr2("第五列") = dr2("输入光功率")
nr2("第六列") = dr2("输出光功率")
Next
Dim a As String= "日期20130411"
Dim max As Double = 0
Dim pdr As DataRow
Dim drs As List(of DataRow)=DataTables("表A").Select("")
For Each dr As DataRow In drs
Dim n = dr("第六列")
If n = "-" Then
Continue For
End If
If n > max Then
pdr = dr
max = n
End If
Next
output.Show(max)
Tables("a")(3,5) = max
DataTables("表A").DeleteFor("[网元ID] = id")
next
[此贴子已经被作者于2018/1/10 12:24:03编辑过]