Example #1
0
        public ActionResult Supprimer(int id)
        {
            RoleServiceAPI  rsa = new RoleServiceAPI();
            RoleSuppression r   = new RoleSuppression(rsa.Donner(id));

            return(View(r));
        }
Example #2
0
        public ActionResult Index()
        {
            RoleServiceAPI          rs = new RoleServiceAPI();
            IEnumerable <RoleIndex> ri = rs.Donner().Select(j => new RoleIndex(j));

            return(View(ri));
        }
Example #3
0
        public ActionResult Details(int id)
        {
            RoleServiceAPI rsa = new RoleServiceAPI();
            Role           r   = rsa.Donner(id);
            RoleDetails    rd  = new RoleDetails(r);

            return(View(rd));
        }
Example #4
0
        public ActionResult Modifier(int id)
        {
            RoleServiceAPI   rs = new RoleServiceAPI();
            RoleModification r  = new RoleModification(rs.Donner(id));



            return(View(r));
        }
Example #5
0
        public ActionResult Supprimer(int id, RoleSuppression r)
        {
            RoleServiceAPI  rsa = new RoleServiceAPI();
            RoleSuppression rr  = new RoleSuppression(rsa.Donner(id));

            if (ModelState.IsValid)
            {
                //RoleServiceAPI rsa = new RoleServiceAPI();
                bool b = rsa.Supprimer(id);
                if (b)
                {
                    return(RedirectToAction("Index"));
                }
            }
            return(View("Error"));
        }