Ejemplo n.º 1
0
 public static object CreateResponse(DataTablesRequest request, int totalRecord, int totalDisplayRecord, string[] data)
 {
     return(new
     {
         sEcho = request.sEcho,
         iTotalRecords = totalRecord,
         iTotalDisplayRecords = totalDisplayRecord,
         aaData = data
     });
 }
Ejemplo n.º 2
0
        public static object CreateResponse(DataTablesRequest request, int totalRecord, int totalDisplayRecord, List <object> dataList)
        {
            string[] data = dataList.ConvertAll(x => x.ToString()).ToArray();

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