How best to do this

How best to do this

Old forum URL: forums.lhotka.net/forums/t/5042.aspx


JohnCantley posted on Tuesday, July 01, 2008

Using the latest version 2 code.

I have a form that lists the days of the week and appointments for each day. I grab all of the appointments slots for a particular center and then want to break them down by day and display them. I was looking at using the FindAll predicate but see that it is not part of the read only business base. Can I add that to the read only base and then pull in all days and just find the days using something like FindAll and bind them that way or should I pull each day one at a time and display that way. This will not be heavily used so 7 db calls is not out of the question. I was hoping to see a FindAll in there and then just grab them out of my business object. If I can add a FindAll can someone point me to where I need to look to do that?

nermin replied on Tuesday, July 01, 2008

I would use FilteredBindingList.  To Csla List FilteredBindingList is what DataView is to DataTable.  Everything is stored in the BusinesList but subset is accessible form the FilteredBindingList.

 

Moreover, the same way you specify predicates for FindAll, you can specify custom filter criteria in your implementation of FilteredBindingList;

 

 

Nermin

 

From: JohnCantley [mailto:cslanet@lhotka.net]
Sent: Tuesday, July 01, 2008 12:29 PM
To: Nermin Dibek
Subject: [CSLA .NET] How best to do this

 

Using the latest version 2 code.

I have a form that lists the days of the week and appointments for each day. I grab all of the appointments slots for a particular center and then want to break them down by day and display them. I was looking at using the FindAll predicate but see that it is not part of the read only business base. Can I add that to the read only base and then pull in all days and just find the days using something like FindAll and bind them that way or should I pull each day one at a time and display that way. This will not be heavily used so 7 db calls is not out of the question. I was hoping to see a FindAll in there and then just grab them out of my business object. If I can add a FindAll can someone point me to where I need to look to do that?



Copyright (c) Marimer LLC