annotate Agendas/trunk/src/Agendas.Web/Controllers/HistoricoController.cs @ 174:3c70b0d8bd69

Ticket 159: Corrección temporal. Al obtener el nombre se remplazan los caracteres erróneos por los que corresponde.
author juanjose.montesdeocaarbos
date Mon, 08 Aug 2011 06:17:19 -0300
parents 4e4b758ab744
children 2d02adb79322
rev   line source
119
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
1 using System.Linq;
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
2 using System.Web.Mvc;
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
3 using AltNetHispano.Agendas.Factories;
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
4 using AltNetHispano.Agendas.Web.Models;
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
5
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
6 namespace AltNetHispano.Agendas.Web.Controllers
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
7 {
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
8 public class HistoricoController : Controller
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
9 {
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
10 public ActionResult Index()
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
11 {
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
12 var agenda = AgendaFactory.GetAgenda();
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
13
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
14 var model = new HistoricoIndexModel
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
15 {
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
16 Items = from e in agenda.GetHistorico()
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
17 orderby e.Fecha
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
18 select new HistoricoDto
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
19 {
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
20 Id = e.Id.ToString(),
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
21 Titulo = e.Titulo,
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
22 Fecha = e.Fecha.HasValue ? e.Fecha.Value.ToShortDateString() : string.Empty,
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
23 Wiki = e.UrlWiki,
148
c99636fbdc5f Ticket 155: Agregar Nro de Orden, Tipo y Duración real en la pantalla de Histórico, similar a como es la página actual en altnethispano.org.
juanjose.montesdeocaarbos
parents: 119
diff changeset
24 Ponente = e.Ponente.Nombre,
c99636fbdc5f Ticket 155: Agregar Nro de Orden, Tipo y Duración real en la pantalla de Histórico, similar a como es la página actual en altnethispano.org.
juanjose.montesdeocaarbos
parents: 119
diff changeset
25 Numero = e.NumeroOrden.ToString(),
c99636fbdc5f Ticket 155: Agregar Nro de Orden, Tipo y Duración real en la pantalla de Histórico, similar a como es la página actual en altnethispano.org.
juanjose.montesdeocaarbos
parents: 119
diff changeset
26 Tipo = e.Tipo.ToString(),
171
4e4b758ab744 Ticket 155: Se carga la Duración correcta, formateada en HH:MM
juanjose.montesdeocaarbos
parents: 161
diff changeset
27 Duracion = e.Duracion.ToString(@"hh\:mm")
119
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
28 }
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
29 };
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
30 return View(model);
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
31 }
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
32 }
8fa58a79656a Historico
Nelo@Kenia.neluz.int
parents:
diff changeset
33 }