using Newtonsoft.Json;
public ActionResult GetList(int page,int limit)
{bbs.OpenConnection();
// DataSet ds = new DataSet();
string sql = "SELECT id,nameFROM table";
string sqlcount = "select count(*) as total from (" + sql + ")as a ";
string count = bbs.List(sqlcount).Tables[0].Rows[0]["total"].ToString();
sql = cc.SqlLimit(sql, " id ", page, limit);
// ds = bbs.List(sql);
DataTable dt = bbs.List(sql).Tables[0];
bbs.CloseConnection();
return Content(JsonConvert.SerializeObject( dt ));
}
public ActionResult GetList(int page,int limit)
{
bbs.OpenConnection();
// DataSet ds = new DataSet();
string sql = "SELECT id,nameFROM table";
string sqlcount = "select count(*) as total from (" + sql + ")as a ";
string count = bbs.List(sqlcount).Tables[0].Rows[0]["