示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
            }
        }