using System.Collections.Generic;

namespace Stat.BLL
{
    /// <summary>
    /// 友情连接
    /// </summary>
    public class FriendLink
    {
        private static IDAL.IFriendLink dal = DALFactory.AbstractFactory.GetInstance().CreateFriendLink();
        /// <summary>
        /// 获取所有连接
        /// </summary>
        /// <returns></returns>
        public static IList<Stat.Model.FriendLink> Get()
        {
            return dal.Get();
        }
        /// <summary>
        /// 获取连接信息
        /// </summary>
        /// <returns></returns>
        public static IList<Stat.Model.FriendLink> Get(int id)
        {
            return dal.Get(id);
        }
        /// <summary>
        /// 获取某类型的 所有连接信息
        /// </summary>
        /// <param name="cType">类型</param>
        /// <returns></returns>
        public static IList<Stat.Model.FriendLink> GetcType(int cType)
        {
            return dal.GetcType(cType);
        }
        /// <summary>
        /// 更新连接信息
        /// </summary>
        /// <returns></returns>
        public static bool Update(Stat.Model.FriendLink model)
        {
            return dal.Update(model);
        }
        /// <summary>
        /// 添加连接信息
        /// </summary>
        /// <returns></returns>
        public static bool Insert(Stat.Model.FriendLink model)
        {
            return dal.Insert(model);
        }
        /// <summary>
        ///删除连接信息
        /// </summary>
        /// <returns></returns>
        public static bool Delete(int id)
        {

            return dal.Delete(id);
        }
        /// <summary>
        /// 获取友情链接
        /// </summary>
        /// <param name="num">数目</param>
        /// <param name="state">状态：1，已审核</param>
        /// <param name="style">样式：0，文字；1，图片</param>
        ///<param name="cType">0：一般，1：赞助商</param>
        /// <returns></returns>
        public static IList<Stat.Model.FriendLink> Get(int num, int state, int style, int cType)
        {
            return dal.Get(num, state, style, cType);
        }
        /// <summary>
        /// 获取友情链接
        /// </summary>
        /// <param name="num">数目</param>
        /// <param name="state">状态：1，已审核</param>
        /// <param name="style">样式：0，文字；1，图片</param>
        /// <param name="cType">2：小LOgo广告</param>
        /// <param name="Position">位置：0,1,2,3</param>
        /// <returns></returns>
        public static IList<Stat.Model.FriendLink> Get(int num, int state, int style, int cType, int Position)
        {

            return dal.Get(num, state, style, cType, Position);
        }
    }
}
