|
如何显示一个人员列表的功能.
procedure TfrmSupplySet.LoadPerson;
var
I: Integer;
lFileList: TStrings;
lBizURLs: TStrings;
lParam: TSearchFileParam;
lURL: string;
begin
olvPerson.Nodes.Clear;
olvPerson.Clear;
lFileList := TStringList.Create;
lBizURLs := TStringList.Create;
try
lParam.MatchFileName := '*' + BizObjConsts.cPersonExt;
lParam.SearchSubPath := True;
lParam.MatchAttribute := '';
lParam.MatchCase := False;
lParam.MatchGUIDs := '';
lParam.MatchIndex := '';
FileSys.FileSystem.SearchFile(
JSconst.cOrgFilePrefix + JSconst.cPersonRoot + '\', lParam, lFileList);
for I := 0 to lFileList.Count - 1 do
begin
lURL := BizSys.BizSystem.FileName2URL(lFileList[I]);
// if CanNotSelURLs.IndexOf(lURL) = -1 then
lBizURLs.Add(lURL);
ListBox1.Items.Add(LUrl);
end;
olvPerson.BizURLs := lBizURLs;
olvPerson.Refresh;
finally
lFileList.Free;
lBizURLs.Free;
end;
end;
这个是从系统空间里拿出来的代码,放到我自己的功能上,他就不显示人员列表,在系统空间里面执行是没有能显示的.没有弄明白是什么原因,ListBox1里面是可以显示和人员的路径的,但是Olvperson就是显示不出来. |
|