或者改成
MessageBox.Show(Functions.Execute("部门路径","109",""))
'函数------------------------------------------------------
Dim bmbh As String = Args(0)
Dim cmd As new SQLCommand
cmd.ConnectionName = gs_strActiveConn
cmd.CommandText="sel ect 部门编号,部门名称,上级部门编号,上级部门名称 from {公司部门表} where 部门编号 = '" & bmbh & "'"
Dim dt As DataTable = cmd.ExecuteReader
If dt.DataRows.Count > 0 Then
Dim dr As DataRow = dt.DataRows(0)
If dr("上级部门编号").length > 0 Then
str = dr("部门名称") & "\" & Functions.Execute("部门路径",dr("上级部门编号"))
str = str.trim("\")
End If
End If
Return str
'----------------------------------------------------------