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)); }
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)); }
public async Task <ActionResult> FeatureCodePage(FeatureMappingParameters parameters) { var filter = new FeatureMappingFilter() { PageIndex = PageIndex, PageSize = PageSize }; return(View(await FeatureMappingViewModel.GetModel(DataContext, filter))); }
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)); }
private async Task <FeatureMappingViewModel> GetModelFromParameters(FeatureMappingParameters parameters) { return(await FeatureMappingViewModel.GetModel(DataContext, FeatureMappingFilter.FromFeatureMappingParameters(parameters))); }