using System;
using System.Data;
using SK.MemberDAL;

namespace SK.MemberBLL
{
	/// <summary>
	/// RightMember 的摘要说明。
	/// </summary>
	public class RightMemberSystem
	{
		RightMember member = new RightMember();
		public RightMemberSystem()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		public void Add(object RightID,object PageName)
		{
			member.Add(RightID,PageName);
		}
		public void Add(object ProductID,object RightID,object MemberID)
		{
			member.Add(ProductID,RightID,MemberID);
		}
		public void Delete(object RightID)
		{
			member.Delete(RightID);
		}
		public void Delete_Member(object MemberID)
		{
			member.Delete_Member(MemberID);
		}
		/*
		/// <summary>
		/// 指定页面的管理员列表
		/// </summary>
		/// <param name="RightID"></param>
		/// <returns></returns>
		public DataSet List(object RightID,bool HasRight)
		{
			return member.List(RightID,HasRight);
		}*/
		public DataSet List(object ProductID,object MemberID)
		{
			return member.List(ProductID,MemberID);
		}
		/// <summary>
		/// 指定的管理员是否有该页面的管理权限
		/// </summary>
		/// <param name="PageName"></param>
		/// <param name="MemberID"></param>
		/// <returns></returns>
		public bool Allow(object PageName,object MemberID)
		{
			return member.Allow(PageName,MemberID);
		}
		public bool Allow(object ProductID,object PageName,object MemberID)
		{
			return member.Allow(ProductID,PageName,MemberID);
		}
		public bool Allow_ProductNO(object ProductNO,object PageName,object MemberID)
		{
			object ProductID;
			ProductSystem product = new ProductSystem();
			ProductID = product.ProductID(ProductNO);
			return member.Allow(ProductID,PageName,MemberID);
		}
	}
}
