Esempio n. 1
0
        public IActionResult Delete(int id)
        {
            Contact contactFromDb = _contactDatabase.GetContact(id);

            ContactDeleteViewModel contact = new ContactDeleteViewModel()
            {
                Id       = contactFromDb.Id,
                Naam     = contactFromDb.Naam,
                Voornaam = contactFromDb.Voornaam
            };

            return(View(contact));
        }
Esempio n. 2
0
        public IActionResult Details([FromRoute] int id)
        {
            Contact contact = _contactDatabase.GetContact(id);

            return(View(new ContactDetailViewModel
            {
                Id = contact.Id,
                Name = contact.Name,
                Surname = contact.Surname,
                BirthDate = contact.BirthDate,
                Email = contact.Email,
                TelNr = contact.TelNr,
                Address = contact.Address,
                Annotation = contact.Annotation
            }));
        }
Esempio n. 3
0
        public IActionResult Detail(int id)
        {
            var contactFromDb = _contactDatabase.GetContact(id);
            var contact       = new ContactDetailViewModel()
            {
                FirstName   = contactFromDb.FirstName,
                LastName    = contactFromDb.LastName,
                PhoneNumber = contactFromDb.PhoneNumber,
                Address     = contactFromDb.Address,
                Email       = contactFromDb.Email,
                Description = contactFromDb.Description,
                BirthDate   = contactFromDb.BirthDate,
                ContactType = contactFromDb.ContactType,
                PhotoUrl    = contactFromDb.PhotoUrl,
            };

            return(View(contact));
        }
Esempio n. 4
0
        public IActionResult Detail(int id)
        {
            Contact contactFromDb = _contactDabase.GetContact(id);

            ContactDetailViewModel contact = new ContactDetailViewModel()
            {
                Id            = id,
                Voornaam      = contactFromDb.Voornaam,
                Naam          = contactFromDb.Naam,
                Geslacht      = contactFromDb.Geslacht,
                Geboortedatum = contactFromDb.Geboortedatum,
                TelefoonNr    = contactFromDb.TelefoonNr,
                Email         = contactFromDb.Email,
                Beschrijving  = contactFromDb.Beschrijving,
                Adres         = contactFromDb.Adres,
                Avatar        = contactFromDb.Avatar
            };

            return(View(contact));
        }