[原] 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 ...
随机推荐
- target="_blank"
target="_blank":出现在<a target="_blank" href="http://">中,在开发中,在一个系 ...
- chVsprintf
#if LINUX_SYSTEM int chVsprintf(LPSTR buffer, int nCount, LPCSTR format, va_list argptr) { return vs ...
- CentOS下的Memcache安装步骤(Linux+Nginx+PHP+Memcached)
一.源码包准备 服务器端主要是安装memcache服务器端下载:http://memcached.googlecode.com/files/memcached-1.4.4.tar.gz另外,Memca ...
- [goa]golang微服务框架学习(三)-- 使用swagger-ui展示API
既然goa框架自动生成啦swagger-json文件,那么如何用swagger-ui展示出来呢? 这里分三步: 1.下载swagger-ui的web代码 2.添加swagger.json 和 swag ...
- C# NPOI 导入与导出Excel文档 兼容xlsx, xls
之前写了个小程序,导出一些数据成Excel,程序使用的是Microsoft.Office.Interop.Excel类来操作Excel. 在本机测试的时候都好好的,但是将生成文件放到其他电脑上却怎样也 ...
- HR开发 读取员工工资
1.使用函数读取员工工资. ①数据结构工资结果 DATA: GT_RGDIR TYPE TABLE OF PC261 , GS_RGDIR TYPE PC261 , GT_PAYRESULT TYPE ...
- NC 查询公司下所分配的组织,并存放字符串数组中
private String[] querkFather() { String sql = "select pk_org from org_orgs start with pk_father ...
- 缺省servlet的使用
假如URL地址为http://xxx/xxx/1.html,那么1.html这个静态页面是怎么显示到页面上的呢? 原因:在服务器配置文件conf/web.xml文件中,含有一个缺省的servlet配置 ...
- svn没有对号等符号的问题
文件夹--右键->TortoiseSVN->Settings => 弹出一个对话框,在对话框中左边框中有一个Icon Overlays->Overlay Handlers ...
- 脉冲计数功能在ESM335x-Linux主板上的实现
1.综述 在工业控制中,经常需要获取脉冲信号计数值.频率.周期.占空比等参数.英创嵌入式主板ESM335X系列 Linux系统现已实现外部输入脉冲信号的计数.频率.周期.占空比测量功能. 主要功能及技 ...