annotate Agendas/trunk/src/Agendas.Web/Controllers/HistoricoController.cs @ 193:523e3586b1c1

Combinar
author juanjose.montesdeocaarbos
date Wed, 10 Aug 2011 08:21:32 -0300
parents 2d02adb79322
children 85ddae313408
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()
185
2d02adb79322 Se agrega fecha de termino de un Evento y se incluye la hora a la fecha de inicio.
alabra
parents: 171
diff changeset
17 orderby e.FechaInicio
119
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,
185
2d02adb79322 Se agrega fecha de termino de un Evento y se incluye la hora a la fecha de inicio.
alabra
parents: 171
diff changeset
22 Fecha = e.FechaInicio.HasValue ? e.FechaInicio.Value.ToShortDateString() : string.Empty,
119
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 }