private void InitializeBillingCountryAndProvince() { // SET THE COUNTRY LIST BillToCountry.DataSource = this.Countries; BillToCountry.DataBind(); // INITIALIZE THE BILLING COUNTRY AND PROVINCE LIST string countryCode, province; if (!Page.IsPostBack) { countryCode = _User.PrimaryAddress.CountryCode; province = _User.PrimaryAddress.Province; SelectCountryAndProvince(BillToCountry, countryCode, BillToProvince, BillToProvinceList, BillToPostalCodeRequired, province); } else { countryCode = Request.Form[BillToCountry.UniqueID]; SelectCountry(BillToCountry, countryCode, BillToProvince, BillToProvinceList, BillToPostalCodeRequired); if (BillToProvinceList.Visible) { province = Request.Form[BillToProvinceList.UniqueID]; } else { province = Request.Form[BillToProvince.UniqueID]; } SelectProvince(BillToProvince, BillToProvinceList, province); } }
private void InitializeBillingAddress() { User user = AbleContext.Current.User; BillToFirstName.Text = this.Order.BillToFirstName; BillToLastName.Text = this.Order.BillToLastName; BillToCompany.Text = this.Order.BillToCompany; BillToAddress1.Text = this.Order.BillToAddress1; BillToAddress2.Text = this.Order.BillToAddress2; BillToCity.Text = this.Order.BillToCity; BillToPostalCode.Text = this.Order.BillToPostalCode; //BillToAddressType.SelectedIndex = ( this.Order.BillToIsResidence ? 0 : 1); BillToPhone.Text = this.Order.BillToPhone; //INITIALIZE BILLING COUNTRY AND PROVINCE BillToCountry.DataSource = this.Countries; BillToCountry.DataBind(); if (this.Order.BillToCountryCode.Length == 0) { this.Order.BillToCountryCode = AbleContext.Current.Store.DefaultWarehouse.CountryCode; } SelectCountryAndProvince(BillToCountry, this.Order.BillToCountryCode, false, BillToProvince, BillToProvinceList, BillToPostalCodeRequired, this.Order.BillToProvince, false); }