view Agendas/trunk/src/Agendas.Web/Controllers/HistoricoController.cs @ 277:7439d7a5f8d0

Warning HTML: Cambiado ALT por TITLE.
author juanjose.montesdeocaarbos
date Tue, 20 Dec 2011 08:28:33 -0300
parents 11545cc95491
children a8f7c41e3b47
line wrap: on
line source

using System.Linq;
using System.Web.Mvc;
using AltNetHispano.Agendas.Factories;
using AltNetHispano.Agendas.Web.Models;

namespace AltNetHispano.Agendas.Web.Controllers
{
	public class HistoricoController : Controller
	{
		public ActionResult Index()
		{
			var agenda = AgendaFactory.GetAgenda();

            var model = new HistoricoIndexModel
			            	{
                                Items = from e in agenda.GetHistorico()
			            		        orderby e.NumeroOrden descending
			            		        select new HistoricoDto
			            		               	{
			            		               		Id = e.Id.ToString(),
			            		               		Titulo = e.Titulo,
			            		               		Fecha = e.FechaInicio.HasValue ? e.FechaInicio.Value.ToShortDateString() : string.Empty,
			            		               		Wiki = e.UrlWiki,
													Ponentes = e.Ponentes.Select(p=>p.Nombre),
                                                    Numero = e.NumeroOrden.ToString(),
                                                    Tipo = e.Tipo.ToString(),
													Duracion = e.Duracion.ToString(@"hh\:mm")
			            		               	}
			            	};
			return View(model);
		}
	}
}