コード例 #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
ファイル: ParentController.cs プロジェクト: armejiaf/Mhotivo
 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 = "Parent"
                              };
     return View("ContactEdit", contactInformation);
 }