HBM.Customers.LoadGroupCustomers C# (CSharp) Method

LoadGroupCustomers() private method

private LoadGroupCustomers ( HBM.CustomerManagement CustomerObj ) : void
CustomerObj HBM.CustomerManagement
return void
        private void LoadGroupCustomers(CustMan.Customer CustomerObj)
        {
            hdnCustomerMode.Value = ((int)Common.Enums.CustomerModes.Group).ToString();
            rblCustomerMode.SelectedValue = ((int)Common.Enums.CustomerModes.Group).ToString();

            chkUseSameBillingAddressGrp.Checked = CustomerObj.UseSameBillingAddress;

            tblIndividualCustomer.Visible = false;
            tblGroupCustomer.Visible = true;

            if (CustomerObj.UseSameBillingAddress)
            {
                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;
            }

            txtGroupName.Text = CustomerObj.CustomerName;
            txtBillingAddressLine1Grp.Text = CustomerObj.BillingAddressLine1;
            txtBillingAddressLine2Grp.Text = CustomerObj.BillingAddressLine2;

            txtBillingCityGrp.Text = CustomerObj.BillingCity;

            if (CustomerObj.BillingCountryId.HasValue)
            {
                cmbBillingCountryGrp.Value = CustomerObj.BillingCountryId;
            }

            txtBillingZipPostalCodeGrp.Text = CustomerObj.BillingPostCode;
            txtBillingStateGrp.Text = CustomerObj.BillingState;

            CCExpiryDateGrp = CustomerObj.CCExpirationDate;
            txtNameOnCardGrp.Text = CustomerObj.CCNameOnCard;
            txtCCNoGrp.Text = string.IsNullOrEmpty(CustomerObj.CCNo) ? string.Empty : CustomerObj.CCNo.ToString();
            txtCardSecurityCodeGrp.Text = CustomerObj.CardSecurityCode;

            if (CustomerObj.CardStartDate == null)
            {
                dtStartDateGrp.Text = string.Empty;
            }
            else
            {
                dtStartDateGrp.Value = CustomerObj.CardStartDate;
            }

            txtCardIssueNoGrp.Text = CustomerObj.CardIssueNo;

            if (CustomerObj.CreditCardTypeId.HasValue)
            {
                cmbCCTypeGrp.Value = CustomerObj.CreditCardTypeId.Value;
            }

            txtCompanyAddressLine1Grp.Text = CustomerObj.CompanyAddressLine1;
            txtCompanyAddressLine2Grp.Text = CustomerObj.CompanyAddressLine2;
            txtCompanyCityGrp.Text = CustomerObj.CompanyCity;
            if (CustomerObj.CompanyCountryId.HasValue)
                cmbCompanyCountryGrp.Value = CustomerObj.CompanyCountryId;
            txtCompanyStateGrp.Text = CustomerObj.CompanyState;
            txtCompanyPostCodeGrp.Text = CustomerObj.CompanyPostCode;

            txtCompanyNameGrp.Text = CustomerObj.CompanyName;
            txtCompanyNotesGrp.Text = CustomerObj.CompanyNotes;
            txtEmailGrp.Text = CustomerObj.Email;
            txtFaxGrp.Text = CustomerObj.Fax;

            if (CustomerObj.GuestTypeId > 0)
            {
                cmbGuestTypeGrp.Value = CustomerObj.GuestTypeId;
            }

            txtMemberCodeGrp.Text = CustomerObj.MemberCode;
            txtPhoneGrp.Text = CustomerObj.Phone;

            //Load the grid
            gvGroupMembers.DataSource = CustomerObj.DsGroupCustomers;
            gvGroupMembers.DataBind();
            dsData = CustomerObj.DsGroupCustomers;
            Session[Constants.SESSION_GROUPCUSTOMERS] = dsData;
            dsData.Tables[0].PrimaryKey = new DataColumn[] { dsData.Tables[0].Columns["CustomerId"] };
            rblCustomerMode.Enabled = false;
        }