public async Task <ActionResult> ListFeatures(FeatureParameters parameters) { ValidateFeatureParameters(parameters, FeatureParametersValidator.NoValidation); var filter = new FeatureFilter() { FilterMessage = parameters.FilterMessage, CarLine = parameters.CarLine, ModelYear = parameters.ModelYear, Gateway = parameters.Gateway, Action = FeatureAction.Features }; filter.InitialiseFromJson(parameters); var results = await FeatureViewModel.GetModel(DataContext, filter); var jQueryResult = new JQueryDataTableResultModel(results); foreach (var result in results.Features.CurrentPage) { jQueryResult.aaData.Add(result.ToJQueryDataTableResult()); } return(Json(jQueryResult)); }
public async Task <ActionResult> FeaturePage(FeatureParameters parameters) { var filter = new FeatureFilter() { PageIndex = PageIndex, PageSize = PageSize }; return(View(await FeatureViewModel.GetModel(DataContext, filter))); }
public async Task <ActionResult> ContextMenu(FeatureParameters parameters) { ValidateFeatureParameters(parameters, FeatureParametersValidator.FeatureIdentifier); var filter = FeatureFilter.FromParameters(parameters); filter.Action = FeatureAction.Feature; var derivativeView = await FeatureViewModel.GetModel(DataContext, filter); return(PartialView("_ContextMenu", derivativeView)); }
private async Task <FeatureViewModel> GetModelFromParameters(FeatureParameters parameters) { return(await FeatureViewModel.GetModel(DataContext, FeatureMappingFilter.FromParameters(parameters))); }