下面的功能权限的例子:
static procedure THrLib.AssignPersonFunc(const APersonID: string; const AFuncURL: string);
var
lOrgUnit: TOrgUnit;
lPersonMembers: TList;
i : Integer;
begin
if BizSys.BizSystem.URLExists(AFuncURL) then
begin
lPersonMembers := TList.Create;
lPersonMembers.Clear;
try
OrgSys.OrgSystem.GetPersonMembers(APersonID, lPersonMembers); //
for i := 0 to lPersonMembers.count-1 do
begin
lOrgUnit := TOrgUnit(lPersonMembers.Items);
if (lOrgUnit <> nil) and (lOrgUnit.Module.FuncURLs.IndexOf(AFuncURL) = -1) then
begin
lOrgUnit.Module.RunFuncAlloc.AddItem(AFuncURL);
//lOrgUnit.Module.FuncURLs.Add(AFuncURL);
OrgSys.OrgSystem.SaveUnit(lOrgUnit);
end;
end;
finally
lPersonMembers.Free;
end;
end;
end;