[原] XAF How to bind a stored procedure to a ListView in XAF
First, I suggest that you review the following topic to learn how to show a custom set of objects in a ListView: How to: Display a List of Non-Persistent Objects.
To create non-persistent objects based on a stored procedure, use the Session.GetObjectsFromSproc method. Use the XPObjectSpace.Session property of the Object Space created for a new DetailView to get a Session instance. Here is an example based on the How to: Display a List of Non-Persistent Objects topic:
void showDuplicatesAction_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e) {
IObjectSpace objectSpace = Application.CreateObjectSpace();
StoredProcedureResults resultsHolder = new StoredProcedureResults(); // a custom non-persistent class with a Results collection
ICollection<MyNonPersistentClass> results = ((XPObjectSpace)objectSpace).Session.GetObjectsFromSproc<MyNonPersistentClass>("mySproc");
resultsHolder.Results.AddRange(results);
e.View = Application.CreateDetailView(objectSpace, resultsHolder);
}
[原] XAF How to bind a stored procedure to a ListView in XAF的更多相关文章
- SQL Server 在多个数据库中创建同一个存储过程(Create Same Stored Procedure in All Databases)
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 遇到的问题(Problems) 实现代码(SQL Codes) 方法一:拼接SQL: 方法二: ...
- Stored Procedure 里的 WITH RECOMPILE 到底是干麻的?
在 SQL Server 创建或修改「存储过程(stored procedure)」时,可加上 WITH RECOMPILE 选项,但多数文档或书籍都写得语焉不详,或只解释为「每次执行此存储过程时,都 ...
- [转]Dynamic SQL & Stored Procedure Usage in T-SQL
转自:http://www.sqlusa.com/bestpractices/training/scripts/dynamicsql/ Dynamic SQL & Stored Procedu ...
- Retrieving Out Params From a Stored Procedure With Python
http://www.rodneyoliver.com/blog/2013/08/08/retrieving-out-params-from-a-stored-procedure-with-pytho ...
- Modify a Stored Procedure using SQL Server Management Studio
In Object Explorer, connect to an instance of Database Engine and then expand that instance. Expand ...
- Difference between Stored Procedure and Function in SQL Server
Stored Procedures are pre-compile objects which are compiled for first time and its compiled format ...
- Oracle Stored Procedure demo
1.how to find invalid status stored procedure and recompile them? SELECT OBJECT_NAME , status FROM u ...
- JDBC连接执行 MySQL 存储过程报权限错误:User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted,
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html 内部邀请码:C8E245J (不写邀请码,没有现金送) 国 ...
- [转]Easy Stored Procedure Output Oracle Select
本文转自:http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/ I answered a question on a ...
随机推荐
- zabbix微信告警实践
首先你得有个企业号!!!具体操作步骤可以参考http://itnihao.blog.51cto.com/1741976/1733245,里面写的很详细就不重复了. 微信公众号注册并配置完成后,还需要让 ...
- 做webapp静态页面的一些积累
1)根据pad,手机不同的版本的屏幕大小设置字体的大小(可以使用此方式根据屏幕的不同进行设置,由于我左边的图片是设置的float='left',使用的是img标签的百分比来显示图片) (使用此方式, ...
- h5页面唤起app(iOS和Android),没有安装则跳转下载页面
浏览器和app没有通信协议,所以h5不知道用户的手机释放安装了app.因此只能是h5去尝试唤起app,若不能唤起,引导用户去下载我们的app. 微信里屏蔽了 schema 协议,如果在微信中打开h5, ...
- ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
this issue and the fix was to make sure in tnsnames.ora the SERVICE_NAME is a valid service name in ...
- bc:linux下命令行计算器
在linux下,存在一个命令行的计算器:bc.该程序一般随发行版发布. bc计算器能够执行一些基本的计算,包括+,-,×,\,%. 这些计算不经针对十进制,还可以使用二进制,八进制,十六进制,并且可以 ...
- C# 用POST提交json数据
public void GetResponse(string url, string json) { Encoding encoding = Encoding.UTF8; byte[] data = ...
- whoami与who am i
whoami显示的是当前“操作用户”的用户名,而who am i显示的是“登录用户”的用户名. 若你使用root用户登录,中间su abc切换,whoami的结果是abc,who am i 的结果是r ...
- ADV-时间分配
#include<stdio.h> int map[20][4]; typedef struct node{ int star; int end; }node; node dui[100] ...
- MSMQ(Microsoft Message Queue)
http://www.cnblogs.com/sk-net/archive/2011/11/25/2232341.html 利用 MSMQ(Microsoft Message Queue),应用程序开 ...
- SpringMVC 结合HttpClient调用第三方接口实现
使用HttpClient 依赖jar包 1:commons-httpclient-3.0.jar 2:commons-logging-1.1.1.jar 3:commons-codec-1.6.jar ...