コード例 #1
0
ファイル: AddressBookController.cs プロジェクト: Geta/PayPal
        public ActionResult GetRegionsForCountry(string countryCode, string region, string htmlPrefix)
        {
            ViewData.TemplateInfo.HtmlFieldPrefix = htmlPrefix;
            var countryRegion = new CountryRegionViewModel();

            countryRegion.RegionOptions = _addressBookService.GetRegionsByCountryCode(countryCode);
            countryRegion.Region        = region;

            return(PartialView("~/Views/Shared/EditorTemplates/AddressRegion.cshtml", countryRegion));
        }
コード例 #2
0
        public IActionResult GetRegionsForCountry(string countryCode, string region, string htmlPrefix)
        {
            ViewData.TemplateInfo.HtmlFieldPrefix = htmlPrefix;
            var countryRegion = new CountryRegionViewModel
            {
                RegionOptions = _addressBookService.GetRegionsByCountryCode(countryCode),
                Region        = region
            };

            return(PartialView("_AddressRegion", countryRegion));
        }
コード例 #3
0
        public IActionResult GetRegions(string countryCode, string region, string inputName)
        {
            var countryRegion = new CountryRegionViewModel
            {
                RegionOptions = _addressBookService.GetRegionsByCountryCode(countryCode),
                Region        = region
            };

            ViewData["Name"] = inputName;
            return(PartialView("~/Features/Shared/Views/DisplayTemplates/CountryRegionViewModel.cshtml", countryRegion));
        }
コード例 #4
0
ファイル: AddressModel.cs プロジェクト: lulzzz/Klarna
 public AddressModel()
 {
     CountryRegion = new CountryRegionViewModel();
 }