Community
Showing results for 
Search instead for 
Do you mean 
Reply

Using IFilterCriteria with SubEntities

Copper Contributor
Posts: 41
Country: USA

Using IFilterCriteria with SubEntities

Can anyone give me some direction on searching for records using iFilterCriteria and within SubEntities. I have search these forums and found a couple of examples but none that work.

 

Thank You

 

-Bob Lozinak

Bob Lozinak
Twelve/Three Marketing, Inc.
Software Developer
Copper Super Contributor
Posts: 59
Country: USA

Re: Using IFilterCriteria with SubEntities

Hi Bob,

 

Not sure if you figured it out already, but here's how I would use filtering with custom entities:

 

Public Function GetOrders(ByVal productId As String) As CustomEntityList(Of ApplicationRec) Dim productIdCriteria As New InFilterCriteria(fdProductId, New String() {productId}) Dim dateSort As New SortCriteria(fdDate, System.ComponentModel.ListSortDirection.Descending) Dim list As CustomEntityList(Of Orders) = _ Manager.GetCustomEntities(New SortCriteria() {dateSort}, _ New InFilterCriteria() {productIdCriteria}) Return list End Function

 

I tried implementing the IFilterCriteria interface but didn't quite work, the GetClause method would never get called. So basically the filter classes that implement IFilterCriteria that you have available are InFilterCriteria, NotInFilterCriteria, DateFilterCriteria, ComparisonFilterCriteria and StaticTextFilterCriteria.

Hugo Vale
Datastream Custom Solutions
http://www.datastreamcs.com