comparison Agendas/trunk/src/Agendas.Web/DataProviders.cs @ 291:5f1e3d35e113

Patrocinadores: Correcciones en Vistas.
author juanjose.montesdeocaarbos
date Thu, 09 Feb 2012 00:12:00 -0300
parents c8f378272407
children
comparison
equal deleted inserted replaced
290:15b428ae5931 291:5f1e3d35e113
52 var repository = AgendaFactory.GetPatrocinadorRepository(); 52 var repository = AgendaFactory.GetPatrocinadorRepository();
53 53
54 var patrocinadores = repository.GetAll(); 54 var patrocinadores = repository.GetAll();
55 if (ids == null || !ids.Any()) return new SelectListItem[] { }; 55 if (ids == null || !ids.Any()) return new SelectListItem[] { };
56 56
57 return from p in patrocinadores 57 return from p in from id in ids
58 select new SelectListItem {Text = p.Nombre, Value = p.Id.ToString()}; 58 select repository.GetById(id.ToString())
59 select new SelectListItem { Text = p.Nombre, Value = p.Id.ToString() };
59 } 60 }
60 61
61 public static IEnumerable<SelectListItem> GetPatrocinadoresExcepto(this HtmlHelper helper, IEnumerable<Guid> ids) 62 public static IEnumerable<SelectListItem> GetPatrocinadoresExcepto(this HtmlHelper helper, IEnumerable<Guid> ids)
62 { 63 {
63 var repository = AgendaFactory.GetPatrocinadorRepository(); 64 var repository = AgendaFactory.GetPatrocinadorRepository();