摘要:概述: 当我们遇到把对象的属性及值显示在GridView的时候,我们需要把ojbect转化为DataTable来进行绑定. 代码如下: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/// /// Fills the Data...
阅读全文
03 2009 档案
摘要:概述: 在项目中应用NHibernate架构时,会经常遇到多表查询.因为项目上要用到,通过多天的查询总结了以下两种解决方案. 解决方案: (1)使用HQL语句,然后把查询出的结果存入临时表中,然后再进行绑定. (2)使用select new OaxtJoinGlxt这种语法,根据查询的内容自己构建相应的实体类. 第一种方案实现具体过程: 我的需求如下: 我需要查询JkptOa...
阅读全文
摘要:Named SQL queries may be defined in the mapping document and called in exactly the same way as a named HQL query. In this case, we do not need to call AddEntity(). Code highlighting produced by Act...
阅读全文