Beispiel #1
0
        public string RelationRole2Fun(string roleid, string funArrStr)
        {
            var listSql         = new List <string>();
            var dataTemplateSql = "INSERT INTO PRIVS_ROLE_FUNCPRIVS(ROLEID,PRIVSID) values ('{0}','{1}') ";
            var dataArr         = funArrStr.Split(',');

            listSql.AddRange(dataArr.Select(item => string.Format(dataTemplateSql, roleid, item)));
            var dbContext  = DBHelperPool.Instance.GetDbHelper();
            var bIsSuccess = dbContext.executeTransactionSQLList(listSql);

            return(ToolResult.SuccessJson(bIsSuccess ? "保存角色功能权限成功" : "保存角色功能失败"));
        }