public ActionResult Add(long id) { var model = new ContactInformationRegisterModel { Id = (int) id }; return View("ContactAdd", model); }
public ActionResult ContactAdd(long id) { var model = new ContactInformationRegisterModel { Id = (int) id, Controller = "Parent" }; return View("ContactAdd", model); }
public ActionResult Add(ContactInformationRegisterModel modelContactInformation) { var myContactInformation = new ContactInformation { Type = modelContactInformation.Type, Value = modelContactInformation.Value, People = _peopleRepository.GetById(modelContactInformation.Id) }; ContactInformation contactInformation = _contactInformationRepository.Create(myContactInformation); const string title = "Informacion Agregada"; _viewMessageLogic.SetNewMessage(title, "", ViewMessageType.SuccessMessage); return RedirectToAction("Details/" + contactInformation.People.Id, modelContactInformation.Controller); }