private void LoadIndividualCustomers(CustMan.Customer CustomerObj)
{
hdnCustomerMode.Value = ((int)Common.Enums.CustomerModes.Individual).ToString();
rblCustomerMode.SelectedValue = ((int)Common.Enums.CustomerModes.Individual).ToString();
tblIndividualCustomer.Visible = true;
tblGroupCustomer.Visible = false;
chkUseSameBillingAddress.Checked = CustomerObj.UseSameBillingAddress;
if (CustomerObj.UseSameBillingAddress)
{
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;
}
txtCustomerName.Text = CustomerObj.CustomerName;
txtBillingAddressLine1.Text = CustomerObj.BillingAddressLine1;
txtBillingAddressLine2.Text = CustomerObj.BillingAddressLine2;
txtBillingCity.Text = CustomerObj.BillingCity;
if (CustomerObj.BillingCountryId.HasValue)
{
cmbBillingCountry.Value = CustomerObj.BillingCountryId;
}
txtBillingPostCode.Text = CustomerObj.BillingPostCode;
txtBillingState.Text = CustomerObj.BillingState;
if (string.IsNullOrEmpty(CustomerObj.Car) == false)
{
cmbCar.Text = CustomerObj.Car;
}
txtLicensePlate.Text = CustomerObj.CarLicensePlate;
CCExpiryDate = CustomerObj.CCExpirationDate;
txtNameOnCard.Text = CustomerObj.CCNameOnCard;
txtCCNumber.Text = string.IsNullOrEmpty(CustomerObj.CCNo) ? string.Empty : CustomerObj.CCNo.ToString();
txtCardSecurityCode.Text = CustomerObj.CardSecurityCode;
if (CustomerObj.CardStartDate == null)
{
dtStartDate.Text = string.Empty;
}
else
{
dtStartDate.Value = CustomerObj.CardStartDate;
}
txtCardIssueNo.Text = CustomerObj.CardIssueNo;
if (CustomerObj.CreditCardTypeId.HasValue)
{
cmbCCType.Value = CustomerObj.CreditCardTypeId.Value;
}
txtCompanyAddressLine1.Text = CustomerObj.CompanyAddressLine1;
txtCompanyAddressLine2.Text = CustomerObj.CompanyAddressLine2;
txtCompanyCity.Text = CustomerObj.CompanyCity;
if (CustomerObj.CompanyCountryId.HasValue)
cmbCompanyCountry.Value = CustomerObj.CompanyCountryId;
txtCompanyState.Text = CustomerObj.CompanyState;
txtCompanyPostCode.Text = CustomerObj.CompanyPostCode;
txtCompanyName.Text = CustomerObj.CompanyName;
txtNotes.Text = CustomerObj.CompanyNotes;
txtDriveLicense.Text = CustomerObj.DriverLicense;
txtEmail.Text = CustomerObj.Email;
txtFax.Text = CustomerObj.Fax;
if (CustomerObj.GuestTypeId > 0)
{
cmbGuestType.Value = CustomerObj.GuestTypeId;
}
if (string.IsNullOrEmpty(CustomerObj.Gender) == false)
{
cmbGender.Value = CustomerObj.Gender;
}
txtMemberCode.Text = CustomerObj.MemberCode;
if (CustomerObj.PassportCountryOfIssue.HasValue)
{
cmbPassportCountryOfIssue.Value = CustomerObj.PassportCountryOfIssue;
}
if (CustomerObj.PassportExpirationDate.HasValue)
{
dtpExpiryDate.Date = CustomerObj.PassportExpirationDate.Value;
}
txtPassportNumber.Text = CustomerObj.PassportNumber;
txtPhone.Text = CustomerObj.Phone;
rblCustomerMode.Enabled = false;
}