diff Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs @ 209:a36a76bd6ec3

Se soluciona ticket 173. Se agrega eliminación de personas siempre y cuando no esté asociada a ninguna van.
author alabra
date Wed, 24 Aug 2011 19:27:30 -0300
parents 222362c29416
children 730b80afa70d
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs	Wed Aug 24 11:30:06 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs	Wed Aug 24 19:27:30 2011 -0300
@@ -87,5 +87,20 @@
 
             return View("Defaulteditor", model);
         }
+
+        [CustomAuthorize(Roles = Roles.Administrador)]
+		public ActionResult Quitar(string id)
+        {
+            var personas = AgendaFactory.GetPersonaService();
+            var  result = personas.Delete(new Guid(id));
+            if (result.Succeful)
+            {
+                this.AddNotification("Se ha eliminado correctamente a la persona");
+                
+            }
+            this.AddError(result.Message);
+
+            return RedirectToAction("Index");
+        }
     }
 }
\ No newline at end of file