public ActionResult ExcluirRole(Role role) { if (!ModelState.IsValid) { return(View(role)); } roleDAO.Delete(role); return(RedirectToAction("IndexRoles")); }
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")); } }
public int Delete(RoleType roleId) { return(_roledao.Delete(roleId)); }
public void Delete(Role t) { roleDAO.Delete(t); }