using System;
using System.Collections.Generic;
namespace Stat.BLL
{
    /// <summary>
    /// 
    /// </summary>
    public class WebsiteStructure
    {
        private static IDAL.IWebsiteStructure dal = DALFactory.AbstractFactory.GetInstance().CreateWebsiteStructure();

        /// <summary>
        /// 新增/删除/修改 
        /// </summary>
        /// <param name="model">实体类</param>
        /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
        public static Int32 WebsiteStructureInsertUpdateDelete(Model.WebsiteStructure model)
        {
            return dal.WebsiteStructureInsertUpdateDelete(model);
        }
        /// <summary>
        /// 网站结构规则 分页
        /// </summary>
        /// <param name="pageInfo"></param>
        /// <param name="structure"></param>
        /// <returns></returns>
        public static IList<Model.WebsiteStructure> GetList(ref Model.PageInfo pageInfo, Model.WebsiteStructure structure)
        {
            return dal.GetList(ref pageInfo, structure);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static IList<Stat.Model.WebsiteStructure> GetList(int id)
        {
            return dal.GetList(id);
        }
        /// <summary>
        /// 限统计使用
        /// </summary>
        /// <param name="webID"></param>
        /// <returns></returns>
        public static IList<Model.StatStructure> GetRule(int webID)
        {
            return dal.GetRule(webID);
        }
        /// <summary>
        /// 报表时使用
        /// </summary>
        /// <param name="webID"></param>
        /// <returns></returns>
        public static IList<Model.WebsiteStructure> GetRuleList(int webID)
        {
            return dal.GetRuleList(webID);
        }
    }
}
