Dim ygbh As String = args(1) Dim drs As List(Of DataRow) drs = dt.Select("[上级编号] = '" & ygbh & "'") If drs IsNot Nothing Then For Each dr As DataRow In drs Vars("下属总人数") = Vars("下属总人数")+1 ygbh = dr("员工编号") Functions.Execute("获取所有下级",dt,ygbh) Next End If