Ejemplo n.º 1
0
        //get dropdownlist for neighborhood areas based on city id
        public IActionResult NeighborhoodsDDL(int id)
        {
            DDListModel m = new DDListModel {
                Name = "neighborhoodsddl", Icon = "fa-map-marker"
            };

            m.Items = new List <SelectListItem> {
                new SelectListItem {
                    Value = "0", Text = "- Neighborhood Area -"
                }
            };
            m.Items.AddRange(new  PropertyHubHandler().GetNeighborhoods(new City {
                Id = id
            }).ToItems());
            return(PartialView("~/views/shared/_ddlist.cshtml", m));
        }
Ejemplo n.º 2
0
        //get dropdownlist for cities  based on country id
        public IActionResult CitiesDDL(int id)
        {
            DDListModel m = new DDListModel {
                Name = "citiesddl", Caption = "- City -", Icon = "fa-map-marker"
            };

            m.Items = new List <SelectListItem> {
                new SelectListItem {
                    Value = "0", Text = "- City -"
                }
            };
            m.Items.AddRange(new LocationsHandler().GetCities(new Country {
                Id = id
            }).ToItems());
            return(PartialView("~/views/shared/_ddlist.cshtml", m));
        }