private void familyValidateAndShowError() { if (_entityValidator != null) { _entityValidator.controlCollection = panelFamily.Controls; _entityValidator.DataEntity = familyBindingSource.DataSource; _entityValidator.SetErrorProvider(errorProvider1); FamilyAddressFormPrimary.ValidateAndShowError(); } if (chkFamilyIsTheyRefugees.Checked && !FamilyAddressFormSecondary.IsValid()) { FamilyAddressFormSecondary.ShowMe(); FamilyAddressFormSecondary.ValidateAndShowError(); } if (!FamilyAddressFormPrimary.IsValid()) { FamilyAddressFormPrimary.ShowMe(); FamilyAddressFormPrimary.ValidateAndShowError(); } }
private void ShowFamilyAddressPrimary(object sender, EventArgs e) { FamilyAddressFormPrimary.ShowMe(); FamilyAddressFormSecondary.HideMe(); txtFamilySecondaryAddress.Text = FamilyAddressFormSecondary.FullAddress; }