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

namespace SK.MemberBLL
{
	public enum WebLogType
	{
		Add = 0,
		Delete = 1,
		Update = 2,
		Security = 3,
		Money = 4,

	}
	/// <summary>
	/// 日志管理业务逻辑层
	/// WebType说明：0表示增加记录，1表示删除记录，2表示修改记录，3表示安全性问题
	/// </summary>
	public class WebLogSystem
	{
		WebLog log = new WebLog();
		MainSystem main = new MainSystem();
		public WebLogSystem()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		/// <summary>
		/// 增加LOG
		/// </summary>
		/// <param name="MemberID">用户编号</param>
		/// <param name="Content">内容</param>
		/// <param name="LogType">LOG类型</param>
		public void Add(object MemberID,object Content,WebLogType LogType)
		{
			log.Add(MemberID,Content,(int)LogType);
		}
		/// <summary>
		/// 删除指定的Log
		/// </summary>
		/// <param name="WebLogID">编号</param>
		public void Delete(object WebLogID)
		{
			log.Delete(WebLogID);
		}
		/// <summary>
		/// 删除所有的LOG
		/// </summary>
		public void DeleteAll()
		{
			log.DeleteAll();
		}
		/// <summary>
		/// 返回LOG的指定页
		/// </summary>
		/// <param name="PageSize">每页行数</param>
		/// <param name="PageIndex">页码</param>
		/// <returns></returns>
		public DataSet List(object PageSize,object PageIndex)
		{
			return log.List(PageSize,PageIndex);
		}
		/// <summary>
		/// 返回LOG记录数
		/// </summary>
		/// <returns></returns>
		public int List_Count()
		{
			return log.List_Count();
		}
		/// <summary>
		/// 返回指定类型的LOG记录
		/// </summary>
		/// <param name="WebType">类型</param>
		/// <param name="PageSize">每页记录数</param>
		/// <param name="PageIndex">页码</param>
		/// <returns></returns>
		public DataSet ListofType(WebLogType WebType,object PageSize,object PageIndex)
		{
			return log.ListofType((int)WebType,PageSize,PageIndex);
		}
		/// <summary>
		/// 返回指定类型的记录数
		/// </summary>
		/// <returns></returns>
		public int ListofType_Count(WebLogType WebType)
		{
			return log.ListofType_Count((int)WebType);
		}
	}
}
