コード例 #1
0
        public static string GetRolePreviledgeListByRoleId(int roleId)
        {
            var           sql = "Select * from TRolePreviledge where RoleId=@RoleId";
            var           rolePreviledgeList = SqlHelper.GetList <RolePreviledge>(sql, new SqlParameter("@RoleId", roleId));
            StringBuilder sb = new StringBuilder();

            if (rolePreviledgeList.Count > 0)
            {
                foreach (var rolePreviledge in rolePreviledgeList)
                {
                    sb.Append(rolePreviledge.PreviledgeId + ",");
                }
                sb.Remove(sb.Length - 1, 1);
            }
            return(sb.ToString());
        }