private void addContact(AContactDetail contact) { contact.ContactName = this.PreferredName; DM.Dialogs.ContactDialogue cd = new DM.Dialogs.ContactDialogue( ) { DataContext = contact }; cd.ShowDialog( ); Person.AddContact(contact); SaveToDB( ); RaisePropertyChanged("Contacts"); }
public void DeleteContact(int AthleteID, int contactid) { if (AthleteID == 0) { return; } // existing athlete Athlete Athlete = getAthlete(AthleteID); if (Athlete == null) { return; } AContactDetail detail = Athlete.getAllContacts().Where(c => c.ID == contactid).First(); Athlete.removeContact(detail); }