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

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

            return(PartialView("ZipLookupCounty", model));
        }
예제 #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);
        }
예제 #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())));
            }
        }