l 列表页面配置使用
1、采用列表模板实现列表配置的加载和展现。调用方法:Tmp/MyQuery.aspx?n=listTest(仅xml配置的文件名,不含后缀)
2、Xml配置文件,如listTest.xml需在配置的xml目录的Query目录下
3、以listTest.xml为例:
<?xmlversion="1.0" encoding="utf-8"?>
<root>
<myquery title="测试问题列表" islogicdeal="false" isfirstload="true"allowsorting="true" allowpaging="true"pagervisible="true" >
<select keycolumnnames="id"ismultiselect="false" isshowrownum="false"sortdirection="ascending">
<column name="id"title="序号"width="50px">
s_test.id
</column>
<column name="optime"title="最后更新时间"width="120px">
s_test.optime
</column>
<column name="RDate"title="发现日期"width="100px" dataformat="{0:d}">
s_test.RDate
</column>
<column name="funname"title="所属模块"width="100px">
s_fun.name
</column>
<column name="title" title="标题" width="200px">
s_test.title
</column>
<column name="notes"title="描述">
s_test.notes
</column>
<column name="IClass"title="程度" width="50px"type="select" urlformatstring="1,严重;2,次要;3,一般;4,新需求">
s_test.IClass
</column>
<column name="iflag"title="状态" width="50px"type="select" urlformatstring="0,发现;1,确认;2,解决;3,关闭">
s_test.iflag
</column>
</select>
<from type="table">
<table title="测试表">s_test</table>
<table title="菜单功能表">left join s_fun on s_test.funid=s_fun.id</table>
</from>
<where isparameter="true"isshowappend="false" issession="false">
<colgroup>
<col width="80px">
</col>
<col width="100px">
</col>
<col width="80px">
</col>
<col width="100px">
</col>
<col width="80px">
</col>
<col>
</col>
</colgroup>
<column name="iclass"title="严重程度"width="105px" type="selectint" dataformat=",全部" urlformatstring="1,严重;2,次要;3,一般;4,新需求">
and s_test.iclass={0}
</column>
<column name="funid"title="所属模块"width="105px" type="selectint" dataformat=",全部" urlformatstring="sql:select id,case when parentid>0then ' '+name else name end from s_funwhere iflag=1 order by parentid,sn">
and s_test.funid={0}
</column>
<column name="RDate"title="发生日期"cssclass="text_date" value="getweekfromtodate"type="fromtodate">
<![CDATA[and(datediff(day,{0},s_test.RDate)>=0 anddatediff(day,{1},s_test.RDate)<=0)]]>
</column>
<column name="iflag"title="状态"type="selectint" dataformat=",全部"urlformatstring="0,发现;1,确认;2,解决;3,关闭">
and s_test.iflag={0}
</column>
<column name="title"title="标题" width="100px"target="all" cssclass="input_text">
and s_test.title like {0}
</column>
<column name="notes"title="描述" width="100px"target="all" cssclass="input_text">
and s_test.notes like {0}
</column>
</where>
<order>
s_test.optime desc
</order>
<buttons>
<button name="btnAdd"title="新 增"type="dialog" cssclass="input_button"windowwidth="650" windowheight="650">
Test/TestEdit.aspx
</button>
<button name="btnEdit"title="编 辑"type="dialog" cssclass="input_button"isselectedrow="true" windowwidth="650"windowheight="650">
Test/TestEdit.aspx?id={0}
</button>
<button name="toexcel"title="导出Excel"type="toexcel" cssclass="input_button">
</button>
<button name="delete"functioncode="9001" title="删 除"type="runsql" isselectedrow="true"cssclass="input_button" confirminfo="确认删除选中的记录吗?">
<sql title="选择记录删除成功">delete from S_Test where id={0}</sql>
</button>
</buttons>
<functionsql>
<![CDATA[from s_rolefun rf
inner join s_roleuser ur onur.roleid=rf.roleid
where ur.uid='#USERID#' andrf.funid='{0}']]>
</functionsql>
</myquery>
</root>
欢迎访问:http://121.18.78.216 适易查询分析、工作流、内容管理及项目管理演示平台