public ActionResult ZipLookupCountyCallback() { var zipService = new Data.Services.ZipCodeService(); var model = getZipLookupModel(Request.Params["SelectedState"]); return(PartialView("ZipLookupCounty", model)); }
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); }
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()))); } }