public string GetDataByNum(string num) { if (string.IsNullOrEmpty(num)) { return(""); } StringBuilder str = new StringBuilder(); str.Append("select* from( "); str.Append("select "); str.Append(" top " + num); str.Append(" * from caifenfen "); str.Append(" order by id desc"); str.Append(" ) as a order by id asc"); DataTable dt = caifenfen.GetBySql(str.ToString()); return(JsonHelp.DataTableToStr(dt)); }