启航的风帆

c# 执行sql语句返回表数据 并生成 easyui datagrid 接收数据

var sql = "select * from PrescribeCase where ID in (select CASEID from Prescribe where ISCHECK <> 1)";
DbParameter[] listParameter = new DbParameter[1];
listParameter[0] = new SqlParameter("@id", 1);

var data = db.PrescribeCaseRepository.ExecuteSqlQuery(sql, listParameter);

var result = new { total = data.Count, rows = data };

return JsonWithDate(result, "yyyy-MM-dd HH:mm:ss"); // yyyy-MM-dd

posted on 2021-10-15 10:51  启航的风帆  阅读(133)  评论(0编辑  收藏  举报

导航