Exemple #1
0
        public ActionResult ZipLookupCountyCallback()
        {
            var zipService = new Data.Services.ZipCodeService();

            var model = getZipLookupModel(Request.Params["SelectedState"]);

            return(PartialView("ZipLookupCounty", model));
        }
Exemple #2
0
        Models.Shared.ZipLookupVM getZipLookupModel(string state = null)
        {
            var zipService = new Data.Services.ZipCodeService();

            var model = new Models.Shared.ZipLookupVM();

            model.zluStatesList   = zipService.GetStates();
            model.zluCitiesList   = zipService.GetCitiesList(state);
            model.zluCountiesList = zipService.GetCountiesList(state);

            return(model);
        }
Exemple #3
0
        public ActionResult ZipsByStateAndCounty(string state, string county)
        {
            var zipService = new Data.Services.ZipCodeService();

            var items = zipService.GetZipsByCounty(state, county);

            if (items == null || items.Count == 0)
            {
                return(Content(""));
            }
            else
            {
                return(Content(string.Join(", ", items.ToArray())));
            }
        }