procedure BuildTreeFromDataSet(TreeItem: ttreenodes; SourceDataSet: TDataset); RMT アイオン
var
i, Number: integer;
temptree, Temptree2: ttreenode;
begin
Number := SourceDataSet.Recordcount;
while (not SourceDataSet.IsEmpty)
and
(treeitem.Count < SourceDataSet.RecordCount)
and (Number > 0) do
begin
SourceDataSet.First;
for i := 1 to SourceDataSet.RecordCount do
begin
if FindNode(treeitem, SourceDataSet.fieldbyname('ID').AsInteger) = nil
then begin
if (SourceDataSet.fieldbyname('UpID').AsInteger = -1)
then begin
temptree2 := treeitem.Add(nil, SourceDataSet.fieldbyname('Name').AsString);
temptree2.data := pointer(SourceDataSet.fieldbyname('ID').asinteger);
end
else begin
temptree := FindNode(treeitem, SourceDataSet.fieldbyname('UpID').AsInteger);
if temptree <> nil
then begin
temptree2 := treeitem.AddChild(Temptree, SourceDataSet.fieldbyname('Name').AsString);
temptree2.data := pointer(SourceDataSet.fieldbyname('ID').asinteger);
end;
end;
end;
Sourcedataset.Next;
end;
number := number - 1;
end;
どのようにページのPageRankの値を改善する
11 年前
0 件のコメント:
コメントを投稿