コード例 #1
0
 public ActionResult Add(long id)
 {
     var model = new ContactInformationRegisterModel
                 {
                     Id = (int) id
                 };
     return View("ContactAdd", model);
 }
コード例 #2
0
ファイル: ParentController.cs プロジェクト: armejiaf/Mhotivo
 public ActionResult ContactAdd(long id)
 {
     var model = new ContactInformationRegisterModel
                 {
                     Id = (int) id,
                     Controller = "Parent"
                 };
     return View("ContactAdd", model);
 }
コード例 #3
0
 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);
 }