http://msdn.microsoft.com/en-us/vstudio/gg604823
http://msdn.microsoft.com/en-us/library/ee256728(v=vs.120).aspx
Query
http://blogs.msdn.com/b/msdntaiwan/archive/2014/04/01/vs2013-lightswitch-4.aspx
1) Add Query from Application Data
4. Change parameters to become Optional
Following are two query example for different Application Data
2) Browse Screen
Instead of create a new Browse Screen, we can just change the original one on its Query Source to new added query.
Drag & drop 2 parameters to layout and change their Control Type to Date Picker
The result is like below:
3) Add Query from Application Data, but search UPPER level table
1. We can add a group of filter like 4 which is query on upper level table (Customer, system enable for us by default) 2. We can also use only one parameter (FindString, in the example) to query on different fields of Cutomer and Phone tables
4) Browse Screen
Add another brwose screen base on new query added above, SearchByNameOrPhone
Results are like below:
Query by Phone:
Query by Name:
5) Screen Navigation
1. Right click on HTMLClient of Solution Explorer –> Click Edit Screen Navigation
2. Add two browse screens in Screen Navigation menu
The result is like
沒有留言:
張貼留言