Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Web/Controllers/HistoricoController.cs @ 119:8fa58a79656a
Historico
author | Nelo@Kenia.neluz.int |
---|---|
date | Wed, 22 Jun 2011 09:49:07 -0300 |
parents | |
children | c99636fbdc5f |
comparison
equal
deleted
inserted
replaced
118:b74734a1a755 | 119:8fa58a79656a |
---|---|
1 using System.Linq; | |
2 using System.Web.Mvc; | |
3 using AltNetHispano.Agendas.Factories; | |
4 using AltNetHispano.Agendas.Web.Models; | |
5 | |
6 namespace AltNetHispano.Agendas.Web.Controllers | |
7 { | |
8 public class HistoricoController : Controller | |
9 { | |
10 public ActionResult Index() | |
11 { | |
12 var agenda = AgendaFactory.GetAgenda(); | |
13 | |
14 var model = new HistoricoIndexModel | |
15 { | |
16 Items = from e in agenda.GetHistorico() | |
17 orderby e.Fecha | |
18 select new HistoricoDto | |
19 { | |
20 Id = e.Id.ToString(), | |
21 Titulo = e.Titulo, | |
22 Fecha = e.Fecha.HasValue ? e.Fecha.Value.ToShortDateString() : string.Empty, | |
23 Wiki = e.UrlWiki, | |
24 Ponente = e.Ponente.Nombre | |
25 } | |
26 }; | |
27 return View(model); | |
28 } | |
29 } | |
30 } |