Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Web/DataProviders.cs @ 231:e5959f3405e0
Eventos sin ponentes
author | nelopauselli |
---|---|
date | Wed, 28 Sep 2011 20:02:44 -0300 |
parents | f23ee59ef1bd |
children | b43dc14886e3 |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/DataProviders.cs Wed Sep 28 19:19:33 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/DataProviders.cs Wed Sep 28 20:02:44 2011 -0300 @@ -18,11 +18,15 @@ public static IEnumerable<SelectListItem> GetPonentes(this HtmlHelper helper, Guid id) { - var personas = AgendaFactory.GetPersonaService(); - return from p in personas.GetAll() - orderby p.Nombre - select - new SelectListItem {Text = p.Nombre, Value = p.Id.ToString(), Selected = p.Id.Equals(id)}; + var lista = new List<SelectListItem> {new SelectListItem {Text = "[Ninguno]", Value = Guid.Empty.ToString()}}; + + var personaService = AgendaFactory.GetPersonaService(); + var personas = from p in personaService.GetAll() + orderby p.Nombre + select + new SelectListItem {Text = p.Nombre, Value = p.Id.ToString(), Selected = p.Id.Equals(id)}; + + return lista.Union(personas); } public static IEnumerable<SelectListItem> GetOtrosPonentes(this HtmlHelper helper, IEnumerable<Guid> ids)