Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Web/DataProviders.cs @ 180:222362c29416
UI para asignación de roles
author | nelopauselli |
---|---|
date | Mon, 08 Aug 2011 16:42:52 -0300 |
parents | 734d3f0853bf |
children | f23ee59ef1bd |
comparison
equal
deleted
inserted
replaced
179:1deccd6c3cb2 | 180:222362c29416 |
---|---|
1 using System; | 1 using System; |
2 using System.Collections.Generic; | 2 using System.Collections.Generic; |
3 using System.Linq; | 3 using System.Linq; |
4 using System.Web.Mvc; | 4 using System.Web.Mvc; |
5 using AltNetHispano.Agendas.Domain; | |
5 using AltNetHispano.Agendas.Factories; | 6 using AltNetHispano.Agendas.Factories; |
6 using AltNetHispano.Agendas.Web.Models; | 7 using AltNetHispano.Agendas.Web.Models; |
7 | 8 |
8 namespace AltNetHispano.Agendas.Web | 9 namespace AltNetHispano.Agendas.Web |
9 { | 10 { |
21 return from p in personas.GetAll() | 22 return from p in personas.GetAll() |
22 orderby p.Nombre | 23 orderby p.Nombre |
23 select | 24 select |
24 new SelectListItem {Text = p.Nombre, Value = p.Id.ToString(), Selected = p.Id.Equals(id)}; | 25 new SelectListItem {Text = p.Nombre, Value = p.Id.ToString(), Selected = p.Id.Equals(id)}; |
25 } | 26 } |
26 } | 27 |
28 public static IEnumerable<string> GetRoles(this HtmlHelper helper) | |
29 { | |
30 return new[] {Roles.Administrador, Roles.Usuario}; | |
31 } | |
32 } | |
27 } | 33 } |