public void AddUserContact() { var contacter = new User_Contact { Name = Name, MobilePhone = MobilePhone, Email = Email, Birthday = Birthday }; database.Contacts.Add(contacter); database.SaveChanges(); Contactso.Add(contacter); }
public void EditUserContact() { var contacter = new User_Contact { Name = SelectedContact.Name, MobilePhone = SelectedContact.MobilePhone, Email = SelectedContact.Email, Birthday = SelectedContact.Birthday }; database.Contacts.Add(contacter); database.SaveChanges(); Contactso.Add(contacter); }
public void SyncUserContact() { Nora nora = new Nora(); nora.Authorize(); List <User_Contact> Friends = nora.CatchFriends(); foreach (User_Contact con in Friends) { var contacter = new User_Contact { Name = con.Name, MobilePhone = con.MobilePhone, Email = con.Email, Birthday = con.Birthday }; database.Contacts.Add(contacter); database.SaveChanges(); Contactso.Add(contacter); } }