[原] 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 ...
随机推荐
- iOS中线程同步基本详解
为什么使用线程同步技术:多个线程是同时执行的 如果多个线程同时操作一个资源 会造成此资源的数据错乱 线程同步简介 线程同步,多条线程按顺序地访问某个资源 注意:此处的同步不是一起执行的意思 是一个一个 ...
- 绘制相切弧arcTo
绘制相切弧 语法: CanvasRenderingContext2D.arcTo( x1, y1, x2, y2, radius ) 描述: 该方法用于绘制圆弧 绘制的规则是当前位置与第一个参考点连线 ...
- 第三章 centos安装git
yum install git 安装后的默认存放地点/usr/bin/git
- Lucene教程(转)
Lucene教程 1 lucene简介1.1 什么是lucene Lucene是一个全文搜索框架,而不是应用产品.因此它并不像www.baidu.com 或者google Desktop那么拿来 ...
- Linux 安装node.js ---- 源码编译的方式
一 : 普通用户: 安装前准备环境: 1.检查Linux 版本 命令: cat /etc/redhat-release 2.检查 gcc.gcc-c++ 是否安装过 命令: rpm -q gcc rp ...
- Daily Scrum 12.16
今日完成任务: 完善了资源界面的UI设计:解决了PDF显示相同的问题:解决了下载时有时找不到文件的问题,因为上届建了upload和resource两个文件夹存文件,写代码时候写乱套了. 明日任务: 黎 ...
- Ceph剖析:Leader选举
作者:吴香伟 发表于 2014/09/11 版权声明:可以任意转载,转载时务必以超链接形式标明文章原始出处和作者信息以及版权声明 Paxos算法存在活锁问题.从节点中选出Leader,然后将所有对数据 ...
- poj3009
#include <stdio.h> int H,L; int qx,qy,zx,zy; int map[21][21]; int ax[4]={-1,0,1,0}; int ay[4]= ...
- [[UIScreen mainScreen] bounds]获取尺寸不对
http://www.cocoachina.com/bbs/read.php?tid-264373.html [[UIScreen mainScreen] bounds]获取尺寸不对 我在 ...
- jsp jsp指令
JSP 由HTML和java语句拼接而成的文本,后缀名为.jsp 1.Jsp翻译成servlet:先翻译,Tomcat将翻译后的文件放置在安装目录下(所有JSP页面本质上就是Servlet程序) 2. ...