using System;
using System.Collections;
using System.Data;
using System.Collections.Generic;
using RedGlovePermission.Model;
using RedGlovePermission.Lib;

namespace RedGlovePermission.BLL
{
	/// <summary>
	/// 业务逻辑类RGP_UserAuthorityList 的摘要说明。
	/// </summary>
	public class RGP_RoleAuthorityList
	{
		private readonly RedGlovePermission.DAL.RGP_RoleAuthorityList dal=new RedGlovePermission.DAL.RGP_RoleAuthorityList();
		public RGP_RoleAuthorityList()
		{}

        /// <summary>
        /// 判断记录是否存在
        /// </summary>
        public bool Exists(RedGlovePermission.Model.RGP_RoleAuthorityList model)
        {
            return dal.Exists(model);
        }

        /// <summary>
        /// 修改角色模块权限
        /// </summary>
        public bool UpdateRoleAuthority(ArrayList list)
        {
            return dal.UpdateRoleAuthority(list);
        }

        /// <summary>
        /// 修改用户模块权限
        /// </summary>
        public bool UpdateUserAuthority(ArrayList list)
        {
            return dal.UpdateUserAuthority(list);
        }

        /// <summary>
        /// 读取角色的模块权限
        /// </summary>
        public DataSet GetRoleAuthorityList(int RoleID, int ModuleID)
        {
            return dal.GetRoleAuthorityList(RoleID, ModuleID);
        }

        /// <summary>
        /// 读取用户的模块权限
        /// </summary>
        public DataSet GetUserAuthorityList(int UserID, int ModuleID)
        {
            return dal.GetUserAuthorityList(UserID, ModuleID);
        }
	}
}