Reading data from Typedlist!

Posts   
 
    
rai
User
Posts: 41
Joined: 25-Jan-2007
# Posted on: 02-May-2008 06:08:21   

I am using LLBLgen version 2.5 with sql server 2005 and visual studio 2005 with C#

i had created a typedlist and then i filter the typedlist as follows: static public ITypedListLgp2 SpecificAreaAggregrate(string publication,int areacode, int salescode) { DataAccessAdapter adapter = new DataAccessAdapter(dbConnectionString()); SpecificAreaAggregateTypedList extracopies = new SpecificAreaAggregateTypedList(); IPredicateExpression bucket = new PredicateExpression(); bucket.Add(IssueMaintenanceFields.PubCode == publication); bucket.Add(IssueMaintenanceFields.FixFlag != true); bucket.Add(CustomerMasterFields.AreaCode == areacode); bucket.Add(CustomerMasterFields.SalesCode == salescode); adapter.FetchTypedList(extracopies, bucket, 0, null, true); return (extracopies); }

ITypedListLgp2 extracopies = CustomerMaster.SpecificAreaAggregrate(publication.PubCode, areacode.AreaCode, salescode.SalesCode);

now i want to loop through the typedlist ...for ex foreach (entity en in extracopies )

just want to know it is possible to do that,,if not please suggest me alternative solution.

sugesstions please..........................

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 02-May-2008 10:20:57   

example:

foreach(SpecificAreaAggregateRow row in extracopies)
{
...
}

For each XyzTypedList generated there is also XyzRow class generated in the same file.

rai
User
Posts: 41
Joined: 25-Jan-2007
# Posted on: 02-May-2008 10:21:57   

Thanks very much......