Esempio n. 1
0
        public void Add()
        {
            _addressBookManager.AddToDatabase(new Person
            {
                Name    = Name,
                Surname = Surname,
                Address = Address,
                Phone   = Phone,
                Email   = Email
            });

            UpdatePeople();
        }
Esempio n. 2
0
        public void Confirm()
        {
            var newPerson = new Person
            {
                Id = _person.Id, Name = Name, Surname = Surname, Address = Address, Phone = Phone, Email = Email
            };

            _addressBookManager.DeleteFromDatabase(_person);
            _addressBookManager.AddToDatabase(newPerson);
            _eventAggregator.PublishOnCurrentThread(new UpdatePeople());

            TryClose();
        }