Feature Request: Build Filtering from the UI

Posts   
 
    
Posts: 112
Joined: 09-Aug-2004
# Posted on: 09-Aug-2004 15:31:27   

I think it would be pretty slick to be able to build the following type of filtering methods straight from the LLBLGen UI.


        Public Function GetByField(ByVal index As WorksheetsFieldIndex, ByVal value As Object) As WorksheetsCollection
            Dim filter As IPredicateExpression = New PredicateExpression
            filter.Add(PredicateFactory.CompareValue(index, ComparisonOperator.Equal, value))
            Dim toReturn As WorksheetsCollection = New WorksheetsCollection
            toReturn.GetMulti(filter)
            Return toReturn
        End Function

Or Like

         Public Function GetWorksheetSummary(ByVal empID As Int32) As WorksheetsCollection
            Dim filter As IPredicateExpression = New PredicateExpression
            filter.Add(PredicateFactory.CompareValue(WorksheetsFieldIndex.EmployeeID, ComparisonOperator.Equal, empID))
            filter.Add(PredicateFactory.CompareValue(WorksheetsFieldIndex.Completed, ComparisonOperator.Equal, 1))
            Dim toReturn As WorksheetsCollection = New WorksheetsCollection
            toReturn.GetMulti(filter)
            Return toReturn
        End Function
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39752
Joined: 17-Aug-2003
# Posted on: 09-Aug-2004 15:51:25   

It might sound great at first, but updating filters will be horrible. The problem is that when you want to update a filter to add another predicate/change a predicate, you have to return to the designer, change the predicate, generate code etc.

It will then be much faster to simply adjust the generated code, which is probably not a good idea.

Frans Bouma | Lead developer LLBLGen Pro
Cadmium avatar
Cadmium
User
Posts: 153
Joined: 19-Sep-2003
# Posted on: 10-Aug-2004 22:50:15   

Otis wrote:

It might sound great at first, but updating filters will be horrible. The problem is that when you want to update a filter to add another predicate/change a predicate, you have to return to the designer, change the predicate, generate code etc.

It will then be much faster to simply adjust the generated code, which is probably not a good idea.

But what about a tool that just generates code that you can copy/paste into your project? It would just help you put together the proper syntax for predicate/sort expressions? I could see that being useful.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39752
Joined: 17-Aug-2003
# Posted on: 10-Aug-2004 23:40:20   

True, a plugin for vs.net for example?

Frans Bouma | Lead developer LLBLGen Pro
JimFoye avatar
JimFoye
User
Posts: 656
Joined: 22-Jun-2004
# Posted on: 12-Aug-2004 21:32:25   

Otis wrote:

True, a plugin for vs.net for example?

Oooh! I like that!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39752
Joined: 17-Aug-2003
# Posted on: 12-Aug-2004 21:43:59   

It's already on the todo simple_smile

Frans Bouma | Lead developer LLBLGen Pro