public AdSearchModel(AdSearchModel adSearchModel) { this.SearchString = adSearchModel.SearchString; this.CitySelectedId = adSearchModel.CitySelectedId; this.CategorySelectedId = adSearchModel.CategorySelectedId; this.CategorySelectedLabel = adSearchModel.CategorySelectedLabel; this.CategoryImagePath = adSearchModel.CategoryImagePath; }
public AdSearchModel(AdSearchModel adSearchModel) { this.SearchString = adSearchModel.SearchString; this.CitySelectedId = adSearchModel.CitySelectedId; this.CategorySelectedId = adSearchModel.CategorySelectedId; this.CategorySelectedLabel = adSearchModel.CategorySelectedLabel; this.CategoryImagePath = adSearchModel.CategoryImagePath; }
public void AdHomeSearchResultModel_ctor_callparentctor() { // Given AdSearchModel sM = new AdSearchModel(); sM.SearchString = "prout"; // When AdHomeSearchResultModel result = new AdHomeSearchResultModel(sM); // Then Assert.AreEqual(0, result.Results.Count); Assert.AreEqual("prout", result.SearchString); }
public void AdSearchModel_SetCategory() { // Given AdSearchModel searchModel = new AdSearchModel { SearchString = "toto", CitySelectedId = 12, CategorySelectedId = 7, CategorySelectedLabel = "Véhicules", CategoryImagePath = "thepath" }; // When AdSearchModel instance = new AdSearchModel(searchModel); // Then Assert.AreEqual(searchModel.SearchString, instance.SearchString); Assert.AreEqual(searchModel.CitySelectedId, instance.CitySelectedId); Assert.AreEqual(searchModel.CategorySelectedLabel, instance.CategorySelectedLabel); Assert.AreEqual(searchModel.CategorySelectedId, instance.CategorySelectedId); Assert.AreEqual(searchModel.CategoryImagePath, instance.CategoryImagePath); }
public AdHomeSearchResultModel(AdSearchModel searchModel) : base(searchModel) { Results = new List <AdHomeSearchResultItemModel>(); }
// // GET: /Search/QuickSearch/ public ActionResult QuickSearch(AdSearchModel model) { ViewBag.Categories = _categoryServices.GetAllCategoriesOfAGroup(model.CategorySelectedId) .Select(x => new SelectListItem { Text = x.Label, Value = x.Id.ToString() }); AdHomeSearchResultModel result = _searchServices.QuickSearch(model); return View(result); }
public AdHomeSearchResultModel(AdSearchModel searchModel) : base(searchModel) { Results = new List<AdHomeSearchResultItemModel>(); }
public AdvancedAdSearchModel(AdSearchModel searchModel) : base(searchModel) { }
public AdvancedAdSearchModel(AdSearchModel searchModel) : base(searchModel) { }