HBM.Customers.chkUseSameBillingAddress_CheckedChanged C# (CSharp) Method

chkUseSameBillingAddress_CheckedChanged() protected method

protected chkUseSameBillingAddress_CheckedChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        protected void chkUseSameBillingAddress_CheckedChanged(object sender, EventArgs e)
        {
            if (chkUseSameBillingAddress.Checked)
            {
                txtCompanyAddressLine1.Value = null;
                txtCompanyAddressLine2.Value = null;
                txtCompanyState.Value = null;
                cmbCompanyCountry.SelectedIndex = -1;
                txtCompanyPostCode.Value = null;
                txtCompanyCity.Value = null;

                txtCompanyAddressLine1.Enabled = false;
                txtCompanyAddressLine2.Enabled = false;
                txtCompanyState.Enabled = false;
                cmbCompanyCountry.Enabled = false;
                txtCompanyPostCode.Enabled = false;
                txtCompanyCity.Enabled = false;

            }
            else
            {
                txtCompanyAddressLine1.Enabled = true;
                txtCompanyAddressLine2.Enabled = true;
                txtCompanyState.Enabled = true;
                cmbCompanyCountry.Enabled = true;
                txtCompanyPostCode.Enabled = true;
                txtCompanyCity.Enabled = true;

            }
        }