public async Task<ActionResult> ListImportExceptions(ImportExceptionParameters parameters)
        {
            ImportExceptionParametersValidator
                .ValidateImportExceptionParameters(parameters, ImportExceptionParametersValidator.ImportQueueIdentifier);

            var filter = new ImportQueueFilter(parameters.ImportQueueId.GetValueOrDefault())
            {
                ExceptionType = parameters.ExceptionType,
                FilterMessage = parameters.FilterMessage,
                Action = ImportAction.ImportQueueItem
            };
            filter.InitialiseFromJson(parameters);

            var results = await ImportViewModel.GetModel(DataContext, filter);
            var jQueryResult = new JQueryDataTableResultModel(results);

            // Iterate through the results and put them in a format that can be used by jQuery datatables
            if (!results.HasExceptions()) return Json(jQueryResult);
            jQueryResult.TotalSuccess = results.Exceptions.TotalSuccess;
            jQueryResult.TotalFail = results.Exceptions.TotalFail;

            foreach (var result in results.Exceptions.CurrentPage)
            {
                jQueryResult.aaData.Add(result.ToJQueryDataTableResult());
            }
            return Json(jQueryResult);
        }
        public async Task<ActionResult> ListPublish(TakeRateParameters parameters)
        {
            TakeRateParametersValidator
                .ValidateTakeRateParameters(DataContext, parameters, TakeRateParametersValidator.NoValidation);

            var filter = new TakeRateFilter()
            {
                FilterMessage = parameters.FilterMessage,
                Action = TakeRateDataItemAction.Publish
            };
            filter.InitialiseFromJson(parameters);

            var results = await PublishViewModel.GetModel(DataContext, filter);
            var jQueryResult = new JQueryDataTableResultModel(results);

            foreach (var result in results.AvailableFiles.CurrentPage)
            {
                jQueryResult.aaData.Add(result.ToJQueryDataTableResult());
            }

            return Json(jQueryResult);
        }
		public async Task<ActionResult> ListTakeRates(TakeRateParameters parameters)
		{
			TakeRateParametersValidator
				.ValidateTakeRateParameters(DataContext, parameters, TakeRateParametersValidator.NoValidation);

			var js = new JavaScriptSerializer();
			var filter = new TakeRateFilter()
			{
				FilterMessage = parameters.FilterMessage,
				TakeRateStatusId = parameters.TakeRateStatusId,
				Action = TakeRateDataItemAction.TakeRates
			};
			filter.InitialiseFromJson(parameters);

			var results = await TakeRateViewModel.GetModel(DataContext, filter);
			var jQueryResult = new JQueryDataTableResultModel(results);

			foreach (var result in results.TakeRates.CurrentPage)
			{
				jQueryResult.aaData.Add(result.ToJQueryDataTableResult());
			}

			return Json(jQueryResult);
		}