From 774b319a47f1bda884f2f249bd65adf502ac5069 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 22 May 2017 21:07:44 -0400 Subject: [PATCH] roledetails --- Project-Unite/Controllers/AdminController.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Project-Unite/Controllers/AdminController.cs b/Project-Unite/Controllers/AdminController.cs index 261c120..8289072 100644 --- a/Project-Unite/Controllers/AdminController.cs +++ b/Project-Unite/Controllers/AdminController.cs @@ -26,5 +26,18 @@ public ActionResult Index(string id = "home") ViewBag.Page = id; return View(); } + + public ActionResult RoleDetails(string id) + { + var db = new ApplicationDbContext(); + Role role = null; + foreach (var r in db.Roles.ToArray()) + { + if (r is Role) + if ((r as Role).Id == id) + role = r as Role; + } + return View(role); + } } }