Click or drag to resize

ParseBatchFile

This topic describes the ShipExec Server ParseBatchFile Business Rule

A business rule hook used to parse a custom file of batch records

Sample ParseBatchFile Business Rule
C#
public BatchRequest ParseBatchFile(string batchReference, System.IO.Stream fileStream, SerializableDictionary userParams)
{
    //Example of parsing a CSV batch file into a data table and then converting to a batch request using custom methods

    var batchRequest = new BatchRequest();
    var dataTable = ConvertCsvtoDataTable(fileStream);
    batchRequest.BatchItems = ConvertDataTableToList(dataTable);
    return batchRequest;
}
See Also