public bool isDuplicate(string Email) { foreach (Person p in abr.GetAll()) { if (p.Email == Email) { return(true); } } return(false); }
public void list() { listView1.Items.Clear(); a.listPerson.Clear(); foreach (Person p in abr.GetAll()) { ListViewItem item1 = new ListViewItem(p.FirstName); item1.SubItems.Add(p.LastName); item1.SubItems.Add(p.Email); item1.SubItems.Add(p.Phone); listView1.Items.Add(item1); a.listPerson.Add(p); } }