public override void SaveViewToModel() { // don't save addresses if billing equals shipping if (this.Model.BillingEqualsShipping && this.BillSameYes.Visible) { return; } if (ConfigurationProvider.DefaultProvider.AddressLocale.Equals("UK")) { BillingAddressUKEditView.SaveViewToModel(); } else { BillingAddressUSEditView.SaveViewToModel(); } }
private void ToggleShowBillSameAsShip(bool same) { if (same) { HyperLinkBillingAddressBook.Visible = false; if (ConfigurationProvider.DefaultProvider.AddressLocale.Equals("UK")) { BillingAddressUKEditView.Hide(); } else { BillingAddressUSEditView.Hide(); } PHBillingAddressStatic.Visible = true; PHBillingAddressEdit.Visible = false; BillingAddressStaticView.Show(); BillingAddressStaticView.BindView(); } else { HyperLinkBillingAddressBook.Visible = this.AddressBookView.Model.IsRegistered; if (ConfigurationProvider.DefaultProvider.AddressLocale.Equals("UK")) { BillingAddressUKEditView.Initialize(); BillingAddressUKEditView.Show(); BillingAddressUKEditView.Enable(); BillingAddressUKEditView.BindView(); } else { BillingAddressUSEditView.Initialize(); BillingAddressUSEditView.Show(); BillingAddressUSEditView.Enable(); BillingAddressUSEditView.BindView(); } PHBillingAddressStatic.Visible = false; PHBillingAddressEdit.Visible = true; } }