Mercurial > altnet-hispano
comparison 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 |
comparison
equal
deleted
inserted
replaced
230:e38d53a1ead9 | 231:e5959f3405e0 |
---|---|
16 select new SelectListItem {Text = t.TipoEventoStr, Value = t.TipoEvento.ToString()}; | 16 select new SelectListItem {Text = t.TipoEventoStr, Value = t.TipoEvento.ToString()}; |
17 } | 17 } |
18 | 18 |
19 public static IEnumerable<SelectListItem> GetPonentes(this HtmlHelper helper, Guid id) | 19 public static IEnumerable<SelectListItem> GetPonentes(this HtmlHelper helper, Guid id) |
20 { | 20 { |
21 var personas = AgendaFactory.GetPersonaService(); | 21 var lista = new List<SelectListItem> {new SelectListItem {Text = "[Ninguno]", Value = Guid.Empty.ToString()}}; |
22 return from p in personas.GetAll() | 22 |
23 orderby p.Nombre | 23 var personaService = AgendaFactory.GetPersonaService(); |
24 select | 24 var personas = from p in personaService.GetAll() |
25 new SelectListItem {Text = p.Nombre, Value = p.Id.ToString(), Selected = p.Id.Equals(id)}; | 25 orderby p.Nombre |
26 select | |
27 new SelectListItem {Text = p.Nombre, Value = p.Id.ToString(), Selected = p.Id.Equals(id)}; | |
28 | |
29 return lista.Union(personas); | |
26 } | 30 } |
27 | 31 |
28 public static IEnumerable<SelectListItem> GetOtrosPonentes(this HtmlHelper helper, IEnumerable<Guid> ids) | 32 public static IEnumerable<SelectListItem> GetOtrosPonentes(this HtmlHelper helper, IEnumerable<Guid> ids) |
29 { | 33 { |
30 var personas = AgendaFactory.GetPersonaService(); | 34 var personas = AgendaFactory.GetPersonaService(); |