Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs @ 257:730b80afa70d
Ticket #191: Perfil de Usuarios
author | juanjose.montesdeocaarbos |
---|---|
date | Wed, 19 Oct 2011 09:19:20 -0300 |
parents | a36a76bd6ec3 |
children |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs Tue Oct 18 07:26:59 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs Wed Oct 19 09:19:20 2011 -0300 @@ -102,5 +102,28 @@ return RedirectToAction("Index"); } + + public ActionResult Ver(string id) + { + var personas = AgendaFactory.GetPersonaService(); + + var persona = personas.GetById(new Guid(id)); + if (persona == null) + { + this.AddError("No se encontrĂ³ la persona que intenta visualizar"); + return RedirectToAction("Index"); + } + + var model = new PersonaViewModel + { + Id = persona.Id.ToString(), + Nombre = persona.Nombre, + Twitter = persona.Twitter, + EMail = persona.Mail, + Blog = persona.Blog + }; + + return View("DefaultViewer", model); + } } } \ No newline at end of file