private void BoutonRechercher_Click(object sender, RoutedEventArgs e) { BLL.BLL BLL_RESEARCH_CONTACT = new BLL.BLL(); List <string[]> mesContact_trouver = BLL_RESEARCH_CONTACT.searchContact(phoneARechercher.Text); if (mesContact_trouver != null && mesContact_trouver.Count > 0) { string firstNames = ""; string secondNames = ""; string emails = ""; string phones = ""; string ages = ""; int nbrContactFound = 0; foreach (string[] maListContact in mesContact_trouver) { firstNames += maListContact[0] + "\n"; secondNames += maListContact[1] + "\n"; emails += maListContact[2] + "\n"; phones += maListContact[3] + "\n"; ages += maListContact[4] + "\n"; nbrContactFound++; } listFirstNameFound.Text = firstNames; listSecondNameFound.Text = secondNames; listEmailFound.Text = emails; listPhoneFound.Text = phones; listAgeFound.Text = ages; messageRecherche.Text = nbrContactFound + " contact(s) found"; } else { listFirstNameFound.Text = ""; listSecondNameFound.Text = ""; listEmailFound.Text = ""; listPhoneFound.Text = ""; listAgeFound.Text = ""; messageRecherche.Text = "No contact found"; } }