jquery easyui怎么实现前后台数据的交互
展开全部
dg = $("#chufang").datagrid({
url: 'ashx/HosChuFang.ashx',
columns: [[
{ field: 'HP_PrescriptionDate_Date', title: 'xxx', width: 100 },
{ field: 'HP_PrescriptionDoctor_Vc', title: 'xxx', width: 100 },
{ field: 'HP_PrescriptionFee_Dec', title: 'xxx', width: 100 },
{ field: 'HP_AllowedComp_Dec', title: 'xxx', width: 100 },
{ field: 'HP_UnallowedComp_Dec', title: 'xxx', width: 100 },
{ field: 'kfks', title: 'xxx', width: 140 },
{ field: 'zxks', title: 'xxx', width: 140 },
{ field: 'HP_HosRegisterCode_Vc', title: 'xxx', width: 150 }
]],
pageNumber: 1,
pageSize: 6,
pageList: [6],
striped: true
});
public string GetChuFangMain(HttpContext context)
{
string cond = "DeleteFlag_Ch='N' and HP_HosRegisterCode_Vc='" + regis_code + "'";
int pageSize = int.Parse(context.Request["rows"]);
int pageIndex = int.Parse(context.Request["page"]) - 1;
DataSet ds = bll_hosPreMain.GetListByPage(cond, "HP_PrescriptionDate_Date desc ", (pageIndex) * pageSize + 1, (pageIndex) * pageSize + pageSize);
int count = bll_hosPreMain.GetRecordCount(cond);
string datajson = CXJMJBYLBX.CXJMJBYLBXBLL.FormatToJson.ToJson(ds);
datajson = datajson.Replace("ds", "rows").Replace("System.Byte[]", "0");
datajson = "{\"total\":\"" + count + "\"," + datajson.Substring(1, datajson.Length - 1);
return datajson;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询