use处需要加上Business.Model.org
procedure TMainForm.Button2Click(Sender: TObject);
var
lOrUnit: TorgUnit;
lBizNode: TBizNode;
lList: TStringList;
I: integer;
begin
lList := TStringList.Create;
try
lOrUnit := org.OrgSys.OrgSystem.GetUnit('ZJB','',''); //通过三个ID的方式得到组织单元
lBizNode := BizTree.BizTreeStructure.FindNodeByBizURL(lOrUnit.BizURL); //得到组织单元在组织树中的节点
BizTree.BizTreeStructure.GetChildren(lBizNode.GUID, lList, False); //取子
for I := 0 to lList.Count - 1 do
begin
jsDialogs.ShowMsg(
(lList.Objects[I] as TBizNode).BizURL.ID,
'');
end;
finally
lList.Free;
end;
end; |