本文共 862 字,大约阅读时间需要 2 分钟。
EasyUI的datagrid分页
前台代码:
后台:
public ActionResult TouBiZhaoLingSearch(string startDate, string endDate, int page, int rows){ int totalCount; DataTable dt = cashDal.GetListAll(startDate, endDate, rows, page, out totalCount); Dictionary dic = new Dictionary (); List list = new List(); foreach (DataRow dr in dt.Rows) { Dictionary item = new Dictionary (); item.Add("id", dr["id"].ToString()); item.Add("addTime", dr["addTime"].ToString()); item.Add("orderId", dr["orderId"].ToString()); item.Add("userName", dr["userName"].ToString()); item.Add("opera", ""); list.Add(item); } dic["total"] = totalCount; dic["rows"] = list; return Content(JsonConvert.SerializeObject(dic));}
转载于:https://www.cnblogs.com/s0611163/p/4175670.html