diff Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs @ 180:222362c29416

UI para asignaciĆ³n de roles
author nelopauselli
date Mon, 08 Aug 2011 16:42:52 -0300
parents 1deccd6c3cb2
children a36a76bd6ec3
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs	Mon Aug 08 15:24:26 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs	Mon Aug 08 16:42:52 2011 -0300
@@ -32,7 +32,7 @@
             if (ModelState.IsValid)
             {
                 var personas = AgendaFactory.GetPersonaService();
-                var r = personas.Add(model.Nombre, model.Twitter, model.EMail,model.Blog);
+                var r = personas.Add(model.Nombre, model.Twitter, model.EMail,model.Blog, model.Roles);
                 if (r.Succeful)
                 {
                     this.AddNotification("Los datos fueron guardados");
@@ -62,7 +62,8 @@
         	            		Nombre = persona.Nombre,
         	            		Twitter = persona.Twitter,
         	            		EMail = persona.Mail,
-        	            		Blog = persona.Blog
+        	            		Blog = persona.Blog,
+								Roles = persona.Roles.ToArray()
         	            	};
 
             return View("Defaulteditor", model);
@@ -75,7 +76,7 @@
             if (ModelState.IsValid)
             {
                 var personas = AgendaFactory.GetPersonaService();
-                var r = personas.Update(new Guid(model.Id), model.Nombre, model.Twitter, model.EMail, model.Blog);
+				var r = personas.Update(new Guid(model.Id), model.Nombre, model.Twitter, model.EMail, model.Blog, model.Roles);
                 if (r.Succeful)
                 {
                     this.AddNotification("Los datos fueron guardados");