private void SearchEmployee() { adherentBindingSource.Clear(); Employee employee = null; if (!string.IsNullOrEmpty(txtAdherentID.Text)) { employee = GetEmployeeByID(txtAdherentID.Text); if (employee == null) { AdherentEP.SetError(txtAdherentID, "Identifiant inconnu"); } } else { employee = SelectEmployee(txtDebNom.Text); } if (employee != null) { adherentBindingSource.DataSource = employee; GererContextes(Context.Show); } }
private void RechercherAdherent() { adherentBindingSource.Clear(); Adherent adherent = null; if (!string.IsNullOrEmpty(txtAdherentID.Text)) { adherent = SelectionnerAdherentByID(txtAdherentID.Text); if (adherent == null) { AdherentEP.SetError(txtAdherentID, "Identifiant inconnu"); } } else { adherent = SelectionnerAdherent(txtDebNom.Text); } if (adherent != null) { adherentBindingSource.DataSource = adherent; GererContextes(Contexte.Affichage); } }