使用LIKE param%过滤大型表的对话框(使用HTML客户端)
我正在将VS2012与HTML客户端一起使用.我有一个类似于客户-订单"的场景.添加订单时,我需要查找一个客户,但是有成千上万的客户.因此,我需要一种基于用户输入的参数进行查找的方法.他们应该 输入客户名称的前几个字符,然后运行查询,以便他们可以从过滤列表中选择客户.我有几个具体的问题可以帮助我入门.
I'm using VS2012 with the HTML Client. I have a scenario similar to Customer - Orders. When adding an order, I need to lookup a customer, but there are thousands of customers. So I need a way to do a lookup based on parameters entered by the user. They should key in the first few characters of the customer name and then run a query so they can select the customer from a filtered list. I have a few specific questions to get me started.
1)是否可以在订单输入"表单上执行此操作而不使用对话框或弹出窗口?如果可以,怎么办?
1) Is it possible to do this on the Order entry form without using a dialog or popup? If so, how?
2)如果不是,是否可以通过可共享的对话框而不是弹出窗口来完成此操作?
2) If not, can this be done with a sharable dialog rather than a popup?
3)我尝试了一种对话框方法,但无法在对话框中添加文本框以允许用户键入参数.
3) I've tried a dialog approach and haven't been able to add a textbox to a dialog to allow the user to key in the parameter.
4)应该使用什么事件来运行查询(应该要求它们单击"..."按钮)?
4) What event should be used to run the query (should they be required to click a '...' button)?
5)如何运行查询?我已经创建了服务器端LS查询,但是不确定是否可以使用它.也许我需要运行一个客户端javascript查询,但是我不确定该怎么做.
5) How do I run the query? I've created server-side LS queries, but I'm not sure if I can use that. Maybe I need to run a client-side javascript query, but I'm not sure how to do that.
6)如何将所选客户返回到订单"表单上的绑定客户"字段?
6) How do I return the selected customer to a bound Customer field on the Orders form?
谢谢.
db_csg
通过过滤Visual Studio LightSwitch应用程序的HTML客户端中显示的数据,可以帮助用户识别与他们的任务最相关的数据.例如,您可以创建或修改 浏览数据屏幕可帮助销售人员确定最近三个月从您的公司订购了特定产品的客户.要在屏幕上显示一组特定的数据,您可以创建或自定义查询来确定显示哪些数据 在屏幕上,然后将查询与新屏幕或现有屏幕相关联.
By filtering the data that appears in your HTML client for a Visual Studio LightSwitch application, you can help users identify the most relevant data for their tasks. For example, you can create or modify a Browse Data screen to help salespeople identify customers who ordered a particular product from your company in the last three months. To display a specific set of data on a screen, you create or customize a query that determines what data appears on a screen, and you associate the query with a new or existing screen.