Beispiel #1
0
        public ActionResult ExcluirRole(Role role)
        {
            if (!ModelState.IsValid)
            {
                return(View(role));
            }

            roleDAO.Delete(role);
            return(RedirectToAction("IndexRoles"));
        }
Beispiel #2
0
        public override Task <BooleanObject> DeleteRoleById(KeyObject request, ServerCallContext context)
        {
            int  roleId  = Convert.ToInt32(request.Body);
            bool success = _roleDao.Delete(new Role {
                Id = roleId
            });

            return(Task.FromResult(new BooleanObject {
                Body = success
            }));
        }
        public ActionResult Delete(string id, FormCollection collection)
        {
            try
            {
                roleDAO.Delete(id);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("Error"));
            }
        }
Beispiel #4
0
 public int Delete(RoleType roleId)
 {
     return(_roledao.Delete(roleId));
 }
 public void Delete(Role t)
 {
     roleDAO.Delete(t);
 }