Ejemplo n.º 1
0
 public AdSearchModel(AdSearchModel adSearchModel)
 {
     this.SearchString          = adSearchModel.SearchString;
     this.CitySelectedId        = adSearchModel.CitySelectedId;
     this.CategorySelectedId    = adSearchModel.CategorySelectedId;
     this.CategorySelectedLabel = adSearchModel.CategorySelectedLabel;
     this.CategoryImagePath     = adSearchModel.CategoryImagePath;
 }
Ejemplo n.º 2
0
 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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 public AdHomeSearchResultModel(AdSearchModel searchModel)
     : base(searchModel)
 {
     Results = new List <AdHomeSearchResultItemModel>();
 }
Ejemplo n.º 6
0
        //
        // 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);
        }
Ejemplo n.º 7
0
 public AdHomeSearchResultModel(AdSearchModel searchModel)
     : base(searchModel)
 {
     Results = new List<AdHomeSearchResultItemModel>();
 }
Ejemplo n.º 8
0
 public AdvancedAdSearchModel(AdSearchModel searchModel)
     : base(searchModel)
 {
 }
Ejemplo n.º 9
0
 public AdvancedAdSearchModel(AdSearchModel searchModel)
     : base(searchModel)
 {
 }