New Posts New Posts RSS Feed: Filtering records
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Filtering records

 Post Reply Post Reply
Author
warez_willy View Drop Down
Newbie
Newbie
Avatar

Joined: 23-Dec-2008
Location: Australia
Posts: 10
Post Options Post Options   Quote warez_willy Quote  Post ReplyReply Direct Link To This Post Topic: Filtering records
    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??


Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post 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);

}

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down