/// <summary>
 /// Creates a DataTables response object.
 /// </summary>
 /// <param name="request">The DataTables request object.</param>
 /// <param name="totalRecords">Total records count (total available non-filtered records on database).</param>
 /// <param name="totalRecordsFiltered">Total filtered records (total available records after filtering).</param>
 /// <param name="data">Data object (collection).</param>
 /// <param name="additionalParameters">Adicional parameters dictionary.</param>
 /// <returns>A DataTables response object.</returns>
 public static Core.IDataTablesResponse CreateResponse(this Core.IDataTablesRequest request, int totalRecords, int totalRecordsFiltered, object data, IDictionary <string, object> additionalParameters)
 {
     return(DataTablesResponse.Create(request, totalRecords, totalRecordsFiltered, data, additionalParameters));
 }
Exemple #2
0
 /// <summary>
 /// Creates a new response instance.
 /// </summary>
 /// <param name="request">The request object.</param>
 /// <param name="errorMessage">Error message.</param>
 /// <returns>The response object.</returns>
 public static DataTablesResponse Create(Core.IDataTablesRequest request, string errorMessage)
 {
     return(DataTablesResponse.Create(request, errorMessage, null));
 }
 /// <summary>
 /// Creates a DataTables response object.
 /// </summary>
 /// <param name="request">The DataTables request object.</param>
 /// <param name="errorMessage">Error message to send back to client-side.</param>
 /// <param name="additionalParameters">Aditional parameters dictionary.</param>
 /// <returns>A DataTables response object.</returns>
 public static Core.IDataTablesResponse CreateResponse(this Core.IDataTablesRequest request, string errorMessage, IDictionary <string, object> additionalParameters)
 {
     return(DataTablesResponse.Create(request, errorMessage, additionalParameters));
 }
Exemple #4
0
 /// <summary>
 /// Creates a new response instance.
 /// </summary>
 /// <param name="request">The request object.</param>
 /// <param name="totalRecords">Total record count (total records available on database).</param>
 /// <param name="totalRecordsFiltered">Filtered record count (total records available after filtering).</param>
 /// <param name="data">Data object (collection).</param>
 /// <returns>The response object.</returns>
 public static DataTablesResponse Create(Core.IDataTablesRequest request, int totalRecords, int totalRecordsFiltered, object data)
 {
     return(DataTablesResponse.Create(request, totalRecords, totalRecordsFiltered, data, null));
 }