using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;

namespace Service.Implement
{
	public class SysAuthorityManager : GenericManagerBase<SysAuthority>, ISysAuthorityManager
	{
		/// <summary>
		/// 获取权限
		/// </summary>
		/// <param name="parentId">父结点权限ID</param>
		/// <returns></returns>
		public IList<SysAuthority> GetAuthorities(int parentId)
		{
			return this.LoadAll().Where(r => r.ParentID == parentId).OrderBy(i => i.Sort).ToList();
		}
	}
}
