private void SearchByPhoneNumber() { if (!String.IsNullOrEmpty(txtPhone.Text)) { ContactInfoObject = _contactInfoManager.GetContactInfoByEmailOrPhone(false, txtPhone.Text); if (ContactInfoObject != null) { txtFirstName.Text = ContactInfoObject.FirstName; txtLastName.Text = ContactInfoObject.LastName; txtEmail.Text = ContactInfoObject.Email; txtTitle.SelectedValue = ContactInfoObject.Title; ContactAddresses address = Utility.XmlToObject <ContactAddresses>(ContactInfoObject.ContactAddressXml); if (address != null && !String.IsNullOrEmpty(address.City)) { txtAddress.Text = address.Address; txtCity.Text = address.City; txtState.Text = address.State; txtZipCode.Text = address.Zip; } ContactInfoObject.ContactAddressList = new List <ContactAddresses>(); ContactInfoObject.ContactAddressList.Add(address); } else { txtFirstName.Text = txtLastName.Text = txtEmail.Text = txtAddress.Text = txtCity.Text = txtState.Text = txtZipCode.Text = String.Empty; } } }