public (bool, string) SaveFunctions(string code, List <Pub_RoleFunction> functions) { var r = roleFunctionBLL.DeleteByWhere($"RoleCode='{code}'"); r = roleFunctionBLL.InsertBatch(functions); return(r, r?"保存成功":"保存失败"); }
public Tuple <bool, string> SaveFunctions(string code, List <Pub_RoleFunction> functions) { var r = roleFunctionBLL.DeleteByWhere("RoleCode='" + code + "'"); r = roleFunctionBLL.InsertBatch(functions); return(Tuple.Create(r, r?"保存成功":"保存失败")); }
public ActionResult RoleFunctionEdit(FormCollection form) { var roleCode = form["RoleCode"]; var r = roleFunctionBLL.DeleteByWhere("RoleCode='" + roleCode + "'"); List <Pub_RoleFunction> roleFunction = new List <Pub_RoleFunction>(); var functions = form["selectValues"].ToString().Split(','); foreach (var item in functions) { roleFunction.Add(new Pub_RoleFunction() { RoleCode = roleCode, FunctionCode = item }); } roleFunctionBLL.InsertBatch(roleFunction); rep.errorInfo = "保存成功"; return(Json(rep)); }