本文整理汇总了C#中SearchParameters.GetVehicleTypeDescription方法的典型用法代码示例。如果您正苦于以下问题:C# SearchParameters.GetVehicleTypeDescription方法的具体用法?C# SearchParameters.GetVehicleTypeDescription怎么用?C# SearchParameters.GetVehicleTypeDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchParameters
的用法示例。
在下文中一共展示了SearchParameters.GetVehicleTypeDescription方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Search
public ActionResult Search(SearchParameters<Publication> searchParameters)
{
if (searchParameters == null)
{
throw new NotImplementedException("no entra aca");
}
var result = IndexService.Query(searchParameters);
ViewData["result"] = result;
ViewData["urlCertifica"] = "/buscador/" + (result.VisibleAppliedFilters.Where(appliedFilter => appliedFilter.Name == "vehicle_make_id")
.Count()>0?result.VisibleAppliedFilters.Where(appliedFilter => appliedFilter.Name == "vehicle_make_id").Select(certificaFilter => certificaFilter.Value).First()
:string.Empty);
ViewData["breadcumbs"] = result.Breadcrumbs != null ? result.Breadcrumbs.OrderBy(x => x.Priority).ToList() : new List<Slice>();
ViewData["TotalResult"] = result.TotalResults;
ViewData["Title"] = (result.VisibleAppliedFilters.Exists(appliedFilter => appliedFilter.Name == "vehicle_type_id") ? result.VisibleAppliedFilters.Where(appliedFilter => appliedFilter.Name == "vehicle_type_id").First().Value.Localize() : string.Empty)
+ " " +
string.Join(" ", result.VisibleAppliedFilters.Where(appliedFilter => appliedFilter.Name == "vehicle_make_id" || appliedFilter.Name == "vehicle_model_id").Select(titlePart => titlePart.Value).ToArray())
+ " " +
(result.VisibleAppliedFilters.Exists(filter => filter.Name == "vehicle_loc_loc_id") ? " en " + result.VisibleAppliedFilters.Where(filter => filter.Name == "vehicle_loc_loc_id").First().Value : result.VisibleAppliedFilters.Exists(filter => filter.Name == "vehicle_loc_prov_id") ?
" en " + result.VisibleAppliedFilters.Where(filter => filter.Name == "vehicle_loc_prov_id").First().Value : string.Empty);
var vehicleTypeText = searchParameters.GetVehicleTypeDescription();
ViewData["bannerMainHtml"] = BannerService.GetHtmlBanner(searchParameters.SelectedFilters, "resultadomain", vehicleTypeText);
ViewData["bannerHeaderHtml"] = BannerService.GetHtmlBanner(searchParameters.SelectedFilters, "resultadoheaderderecha", vehicleTypeText);
ViewData["bannerRightHtml"] = BannerService.GetHtmlBanner(searchParameters.SelectedFilters, "resultadoderecha", vehicleTypeText);
ViewData["bannerBottomHtml"] = BannerService.GetHtmlBanner(searchParameters.SelectedFilters, "resultadobottom", vehicleTypeText);
ViewData["vehicleTypeText"] = vehicleTypeText;
ViewData["ImagesUrl"] = ImageUrl;
return View();
}