private void ClearFormData()
{
try
{
if (Request.QueryString["CustomerId"] != null && Request.QueryString["CustomerId"].Trim() != String.Empty)
{
Response.Redirect(Constants.URL_CUSTOMERS, false);
}
else
{
hdnCustomerId.Value = "0";
txtCustomerName.Text = string.Empty;
txtBillingAddressLine1.Text = string.Empty;
txtBillingAddressLine2.Text = string.Empty;
txtBillingCity.Text = string.Empty;
txtBillingPostCode.Text = string.Empty;
txtBillingState.Text = string.Empty;
txtLicensePlate.Text = string.Empty;
txtNameOnCard.Text = string.Empty;
txtCCNumber.Text = string.Empty;
txtCardSecurityCode.Text = string.Empty;
txtCompanyAddressLine1.Text = string.Empty;
txtCompanyAddressLine2.Text = string.Empty;
txtCompanyCity.Text = string.Empty;
txtCompanyPostCode.Text = string.Empty;
txtCompanyState.Text = string.Empty;
cmbCompanyCountry.Value = null;
txtCompanyName.Text = string.Empty;
txtNotes.Text = string.Empty;
txtDriveLicense.Text = string.Empty;
txtEmail.Text = string.Empty;
txtFax.Text = string.Empty;
txtMemberCode.Text = string.Empty;
txtPhone.Text = string.Empty;
dtpExpiryDate.Value = null;
txtPassportNumber.Text = string.Empty;
txtPhone.Text = string.Empty;
cmbCar.Value = null;
cmbBillingCountry.Value = null;
cmbCCType.Value = null;
cmbGender.Value = null;
cmbPassportCountryOfIssue.Value = null;
cmbCCExpiryDateMonth.Value = null;
cmbCCExpiryDateYear.Value = null;
cmbGuestType.Value = null;
txtCustomerName.IsValid = true;
txtMemberCode.IsValid = true;
cmbGender.IsValid = true;
txtPhone.IsValid = true;
cmbGuestType.IsValid = true;
txtBillingAddressLine1.IsValid = true;
txtBillingCity.IsValid = true;
txtEmail.IsValid = true;
txtCompanyAddressLine1.Enabled = true;
txtCompanyAddressLine2.Enabled = true;
txtCompanyState.Enabled = true;
cmbCompanyCountry.Enabled = true;
txtCompanyPostCode.Enabled = true;
txtCompanyCity.Enabled = true;
rblCustomerMode.Enabled = true;
tblIndividualCustomer.Visible = true;
tblGroupCustomer.Visible = false;
hdnCustomerMode.Value = "1";
hdnCustomerMode.Value = "1";
rblCustomerMode.SelectedValue = ((int)Common.Enums.CustomerModes.Individual).ToString();
}
}
catch (System.Exception)
{
}
}