Ejemplo n.º 1
0
        public ActionResult Edit(ContactInformationEditModel modelContactInformation)
        {
            ContactInformation myContactInformation = _contactInformationRepository.GetById(modelContactInformation.Id);

            myContactInformation.Type  = modelContactInformation.Type;
            myContactInformation.Value = modelContactInformation.Value;
            ContactInformation contactInformation = _contactInformationRepository.Update(myContactInformation);
            const string       title = "Contacto Actualizado";

            _viewMessageLogic.SetNewMessage(title, "", ViewMessageType.InformationMessage);
            return(RedirectToAction("Details/" + contactInformation.People.Id, modelContactInformation.Controller));
        }
Ejemplo n.º 2
0
        public ActionResult ContactEdit(long id)
        {
            var thisContactInformation = _contactInformationRepository.GetById(id);
            var contactInformation     = Mapper.Map <ContactInformationEditModel>(thisContactInformation);

            contactInformation.Controller = "Student";
            return(View("ContactEdit", contactInformation));
        }
Ejemplo n.º 3
0
        public ActionResult ContactEdit(long id)
        {
            ContactInformation thisContactInformation = _contactInformationRepository.GetById(id);
            var contactInformation = new ContactInformationEditModel
            {
                Type       = thisContactInformation.Type,
                Value      = thisContactInformation.Value,
                Id         = thisContactInformation.Id,
                People     = thisContactInformation.People,
                Controller = "Student"
            };

            return(View("ContactEdit", contactInformation));
        }