Mercurial > altnet-hispano
changeset 78:2adf55ea9199
Fecha del evento en los eventos agendados
author | nelopauselli |
---|---|
date | Tue, 24 May 2011 17:56:20 -0300 |
parents | a300394dbabe |
children | 8df9db937434 |
files | Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs Agendas/trunk/src/Agendas.Web/Views/Evento/Index.cshtml |
diffstat | 3 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Tue May 24 14:40:23 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Tue May 24 17:56:20 2011 -0300 @@ -14,8 +14,8 @@ var model = new EventoIndexModel { - ProximosEventos = from e in agenda.GetEventosAgendados() - select new EventoDto { Id = e.Id.ToString(), Titulo = e.Titulo } + ProximosEventos = from e in agenda.GetEventosAgendados() orderby e.Fecha + select new EventoDto { Id = e.Id.ToString(), Titulo = e.Titulo, Fecha = e.Fecha.Value } }; return View(model);
--- a/Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs Tue May 24 14:40:23 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs Tue May 24 17:56:20 2011 -0300 @@ -46,5 +46,6 @@ { public string Id { get; set; } public string Titulo { get; set; } + public DateTime Fecha { get; set; } } } \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Evento/Index.cshtml Tue May 24 14:40:23 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Views/Evento/Index.cshtml Tue May 24 17:56:20 2011 -0300 @@ -6,6 +6,7 @@ <table> <thead> <tr> + <th>Fecha</th> <th>Evento</th> <th>Acciones</th> </tr> @@ -14,10 +15,14 @@ @foreach (var item in Model.ProximosEventos) { <tr> + <td>@item.Fecha.ToShortDateString()</td> <td>@item.Titulo</td> - <td>@Html.ActionLink("Modificar", "Edit", new { id = item.Id })</td> + <td> + @Html.ActionLink("Modificar", "Edit", new { id = item.Id }) + @Html.ActionLink("Confirmar", "Confirm", new { id = item.Id }) + </td> </tr> - } + } </tbody> </table>