public async Task <ActionResult> ListIgnoredExceptions(IgnoredExceptionParameters parameters)
        {
            ValidateIgnoredExceptionParameters(parameters, IgnoredExceptionParametersValidator.NoValidation);

            var filter = new IgnoredExceptionFilter()
            {
                FilterMessage = parameters.FilterMessage,
                CarLine       = parameters.CarLine,
                ModelYear     = parameters.ModelYear,
                Gateway       = parameters.Gateway,
                Action        = IgnoredExceptionAction.Exceptions
            };

            filter.InitialiseFromJson(parameters);

            var results = await IgnoredExceptionViewModel.GetModel(DataContext, filter);

            var jQueryResult = new JQueryDataTableResultModel(results);

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

            return(Json(jQueryResult));
        }
        public async Task <ActionResult> ModalContent(IgnoredExceptionParameters parameters)
        {
            ValidateIgnoredExceptionParameters(parameters, IgnoredExceptionParametersValidator.Action);

            var filter = IgnoredExceptionFilter.FromParameters(parameters);
            var ignoredExceptionView = await IgnoredExceptionViewModel.GetModel(DataContext, filter);

            return(PartialView(GetContentPartialViewName(parameters.Action), ignoredExceptionView));
        }
        public async Task <ActionResult> IgnoredExceptionPage(IgnoredExceptionParameters parameters)
        {
            var filter = new IgnoredExceptionFilter()
            {
                PageIndex = PageIndex,
                PageSize  = PageSize
            };

            return(View(await IgnoredExceptionViewModel.GetModel(DataContext, filter)));
        }
        public async Task <ActionResult> ContextMenu(IgnoredExceptionParameters parameters)
        {
            ValidateIgnoredExceptionParameters(parameters, IgnoredExceptionParametersValidator.IgnoredExceptionIdentifier);

            var filter = IgnoredExceptionFilter.FromParameters(parameters);

            filter.Action = IgnoredExceptionAction.Exception;

            var ignoredExceptionView = await IgnoredExceptionViewModel.GetModel(DataContext, filter);

            return(PartialView("_ContextMenu", ignoredExceptionView));
        }
 private async Task <IgnoredExceptionViewModel> GetModelFromParameters(IgnoredExceptionParameters parameters)
 {
     return(await IgnoredExceptionViewModel.GetModel(DataContext, IgnoredExceptionFilter.FromParameters(parameters)));
 }