Print Page | Close Window

Filtering records

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1038
Printed Date: 14-Sep-2025 at 6:49am


Topic: Filtering records
Posted By: warez_willy
Subject: Filtering records
Date Posted: 27-Dec-2008 at 1:07pm
I am using the dev force sample code for configuring winforms.

I have adapted it to my database. Which is rather large 6000+ customers.
I want to search for a customer (based on 'lastfirst' field is fine)
I would like to know the best practise for this.

where do I put the code... in the Custom control or in the tab page??





Replies:
Posted By: GregD
Date Posted: 29-Dec-2008 at 6:21pm
If you're using the solution from the "Composing WinForms with UserControls" solution, that one lets the TabPage handle construction of the data retrieval query. It then passes that query to UserControl's LoadMainData() method.
 
Here, for example, is the LoadData() method from the EmployeeTabPage. Note the highlighted line:
 

public override void LoadData() {

_orderUserControl.LoadSupportingData();

_employeeUserControl.LoadSupportingData();

EntityQuery<Employee> anEntityQuery = _entityManager.Employees;

_employeeUserControl.LoadMainData(anEntityQuery);

}




Print Page | Close Window