예제 #1
0
 public static object CreateResponse(AppDataTablesRequest request, int totalRecord, int totalDisplayRecord, string[] data)
 {
     return(new
     {
         sEcho = request.sEcho,
         iTotalRecords = totalRecord,
         iTotalDisplayRecords = totalDisplayRecord,
         aaData = data
     });
 }
예제 #2
0
        public static object CreateResponse(AppDataTablesRequest request, int totalRecord, int totalDisplayRecord, object dataList)
        {
            //string[] data = dataList.ConvertAll(x => x.ToString()).ToArray();

            string data = (JsonConvert.SerializeObject(new { dataList }));

            return(new
            {
                sEcho = request.sEcho,
                iTotalRecords = totalRecord,
                iTotalDisplayRecords = totalDisplayRecord,
                aaData = data
            });
        }