标签:
procedure TfrmstPostImageCollate.LoadCollateImage(AOrderID: integer);
var
mySql: string;
node: TcxTreeListNode;
cPhoto, cFullPhoto: string;
begin
Screen.Cursor := crHourGlass;
tlResult.BeginUpdate;
tlResult.Clear;
LockWindowUpdate(Handle);
mySql := ‘ Select * from stCardPhotos where iOrderid=‘ + IntToStr(AOrderID);
OpenQuery(qryUnit, mySql);
try
with qryUnit do
begin
while not Eof do
begin
cPhoto := FieldByName(‘gPhoto‘).AsString;
cFullPhoto := FieldByName(‘cFullPhoto‘).AsString;
if cFullPhoto <> ‘‘ then
begin
node := tlResult.Add;
node.Texts[tlcResGPhoto.ItemIndex] := cPhoto;
node.Texts[tlcResCFullPhoto.ItemIndex] := FieldByName(‘cFullPhoto‘).AsString;
end;
Next;
end;
end;
finally
tlResult.EndUpdate;
LockWindowUpdate(0);
Screen.Cursor := crDefault;
end;
end;
如下图:
标签:
原文地址:http://www.cnblogs.com/zhangzhifeng/p/5051477.html