public ContentResult B_UserToDel(int id) { B_User user = B_User.GetEntityByID(id); if (CurrentUser.UserName == user.UserName) { return(Content("不能删除当前登录用户")); } int rtn = B_User.DeleteByID(id); if (rtn > 0) { B_Role.DelUserRoleByUserName(user.UserName); return(Content("ok")); } return(Content("删除出错")); }