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