public ActionResult UserRoleAction(string action, string role_id, string user_id) { return(RunActionWhenLogin((loginuser) => { var model = new UserRoleModel(); model.RoleID = role_id; model.UserID = user_id; var bll = new UserRoleBll(); if (action == "add") { return GetJsonRes(bll.AddUserRole(model)); } if (action == "del") { return GetJsonRes(bll.DeleteUserRole(model.UserID, model.RoleID)); } return GetJsonRes("未知请求"); })); }