Example #1
0
        public async Task <ActionResult> ListFeatureCodes(FeatureMappingParameters parameters)
        {
            ValidateFeatureMappingParameters(parameters, FeatureMappingParametersValidator.NoValidation);

            var filter = new FeatureMappingFilter()
            {
                FilterMessage = parameters.FilterMessage,
                CarLine       = parameters.CarLine,
                ModelYear     = parameters.ModelYear,
                Gateway       = parameters.Gateway,
                Action        = FeatureMappingAction.FeatureCodes,
                DocumentId    = parameters.DocumentId
            };

            filter.InitialiseFromJson(parameters);

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

            var jQueryResult = new JQueryDataTableResultModel(results);

            foreach (var result in results.OxoFeatures.CurrentPage)
            {
                try
                {
                    jQueryResult.aaData.Add(result.ToJQueryDataTableResult());
                }
                catch (Exception ex)
                {
                    Log.Error(ex);
                }
            }
            return(Json(jQueryResult));
        }
Example #2
0
        public async Task <ActionResult> ModalContent(FeatureMappingParameters parameters)
        {
            ValidateFeatureMappingParameters(parameters, FeatureMappingParametersValidator.Action);

            var filter = FeatureMappingFilter.FromFeatureMappingParameters(parameters);
            var derivativeMappingView = await FeatureMappingViewModel.GetModel(DataContext, filter);

            return(PartialView(GetContentPartialViewName(parameters.Action), derivativeMappingView));
        }
Example #3
0
        public async Task <ActionResult> FeatureCodePage(FeatureMappingParameters parameters)
        {
            var filter = new FeatureMappingFilter()
            {
                PageIndex = PageIndex,
                PageSize  = PageSize
            };

            return(View(await FeatureMappingViewModel.GetModel(DataContext, filter)));
        }
Example #4
0
        public async Task <ActionResult> ContextMenu(FeatureMappingParameters parameters)
        {
            ValidateFeatureMappingParameters(parameters, FeatureMappingParametersValidator.FeatureMappingIdentifier);

            var filter = FeatureMappingFilter.FromFeatureMappingParameters(parameters);

            filter.Action = FeatureMappingAction.Mapping;

            var derivativeMappingView = await FeatureMappingViewModel.GetModel(DataContext, filter);

            return(PartialView("_ContextMenu", derivativeMappingView));
        }
Example #5
0
 private async Task <FeatureMappingViewModel> GetModelFromParameters(FeatureMappingParameters parameters)
 {
     return(await FeatureMappingViewModel.GetModel(DataContext, FeatureMappingFilter.FromFeatureMappingParameters(parameters)));
 }