你的位置:首页 > ASP.net教程

[ASP.net教程]构造查询条件


1、ajax 方式

var data = { orgid :orgid,year:year ,month: month,type:type,sortField:'sellEmpname' ,sortOrder: 'asc'};var json = nui.encode( { criteria: {_expr:[data] }, configCode: configCode });


2、datagrid 构造对象

var param = [ { projectId:projectId }, {projectType:projectType }]; grid.load( { criteria: { _expr:param,_orderby:[{ _property: 'appStatusOrder',_sort: 'asc' }] }});

e.g:

 function find(){  param1=2;  var orgId=nui.get("orgidInput").getValue();  debugger;    var param = [ { orgid:orgId}];     grid.load({ 'criteria': { _expr:param},'param':param1});    }