BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I sort TCollectionItems in a TCollection

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
Willy Hoel
Guest





PostPosted: Wed Nov 12, 2003 10:19 am    Post subject: How can I sort TCollectionItems in a TCollection Reply with quote



Anyone who knows how I can sort a TCollection based on multiple values
in CollectionItems?

My Collection is declared like this:

public
Accounts: TAccounts ;
end;

TAccountType = (atSales,atCash,atOther,atDecimalRounding);

TAccountItem = class(TCollectionItem)
public
AccountType : TAccountType ;
fAmount :Double;
fExVatAmount : Double;
fAccount:String;
fAccountName: String ;
fVatCode:Char;
fDepartment: Integer ;
end;

TAccounts = class(TCollection)
public
procedure AddToAccount(Amount,EksVatAmount:Double;Account,AccountName:String;VatCode:Char;AccountType:TAccountType;
AccountDep: Integer);
end;

How can I sort the Collection based on the values in fAccount combined
with fDepartment?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.