HBM.Customers.chkUseSameBillingAddressGrp_CheckedChanged C# (CSharp) Method

chkUseSameBillingAddressGrp_CheckedChanged() protected method

protected chkUseSameBillingAddressGrp_CheckedChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        protected void chkUseSameBillingAddressGrp_CheckedChanged(object sender, EventArgs e)
        {
            if (chkUseSameBillingAddress.Checked)
            {
                txtCompanyAddressLine1Grp.Value = null;
                txtCompanyAddressLine2Grp.Value = null;
                txtCompanyStateGrp.Value = null;
                cmbCompanyCountryGrp.SelectedIndex = -1;
                txtCompanyPostCodeGrp.Value = null;
                txtCompanyCityGrp.Value = null;

                txtCompanyAddressLine1Grp.Enabled = false;
                txtCompanyAddressLine2Grp.Enabled = false;
                txtCompanyStateGrp.Enabled = false;
                cmbCompanyCountryGrp.Enabled = false;
                txtCompanyPostCodeGrp.Enabled = false;
                txtCompanyCityGrp.Enabled = false;

            }
            else
            {
                txtCompanyAddressLine1Grp.Enabled = true;
                txtCompanyAddressLine2Grp.Enabled = true;
                txtCompanyStateGrp.Enabled = true;
                cmbCompanyCountryGrp.Enabled = true;
                txtCompanyPostCodeGrp.Enabled = true;
                txtCompanyCityGrp.Enabled = true;

            }
        }