mlsjs函数
Dim ys As String = Args(0)
Dim drow As DataRow = Args(1)
Dim zl As Double = 0
Dim dr As DataRow
Dim drs As List(of DataRow)
drs = drow.DataTable.Select("[隶属] = '" & ys & "'")
If drs.Count = 0 Then
If drow.IsNull("单重") = False Then
zl = drow("单重") * drow("隶属数量")
End If
Else
For Each dr In drs
zl += Functions.Execute("mlsjs", drow("元素"),dr)
Next
End If
Return zl
按钮事件
Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1")
tr.CreateTree("表A","绝对路径")
For Each nd As WinForm.TreeNode In tr.AllNodes
Dim zl = Functions.Execute("mlsjs",nd.DataRow("元素") ,nd.DataRow)
nd.Text = nd.DataRow("复合名称") & "数量(" & nd.DataRow("隶属数量") & ")" & "重量(" & zl & ")"
Next
tr.ExpandAll