//by JuSNS v1.0系列
//官方站：www.juSNS.com，演示站:www.ju001.com，www.julala.cn
//QQ:655071(技术)，QQ:9170617（客服）
//MSN:simplt@163.com EMail:simplt@163.com
//program design by Simplt.Xie，arjun
//========================================

using System;
using System.Collections.Generic;
using System.Text;
using JuSNS.Model;
using JuSNS.Common;
using JuSNS.Factory;

namespace JuSNS.Home
{
    /// <summary>
    /// 照片圈人类
    /// </summary>
    public class PhotoLasso
    {
        private IPhotoLasso dal;

        /// <summary>
        /// 构造函数
        /// </summary>
        public PhotoLasso()
        {
            dal = DataAccess.CreatePhotoLasso();
        }

        /// <summary>
        /// 添加照片圈人信息
        /// </summary>
        /// <param name="Info">照片圈人实体类</param>
        /// <returns>添加成功返回1</returns>
        public int Add(PhotoLassoInfo Info)
        {
            return dal.Add(Info);
        }

        /// <summary>
        /// 删除照片圈人
        /// </summary>
        /// <param name="ID">编号</param>
        /// <param name="UserID">用户编号</param>
        /// <param name="FriendID">被圈好友编号</param>
        /// <returns>删除成功返回1</returns>
        public int Del(int ID, int UserID, int FriendID)
        {
            return dal.Del(ID, UserID, FriendID);
        }

        /// <summary>
        /// 取得照片圈人信息
        /// </summary>
        /// <param name="ID">照片圈人编号</param>
        /// <returns>返回照片圈人实体类</returns>
        public PhotoLassoInfo Info(int ID)
        {
            return dal.Info(ID);
        }
        /// <summary>
        /// 取得相应照片圈人信息
        /// </summary>
        /// <param name="PhotoID">照片ID</param>
        /// <returns></returns>
        public List<PhotoLassoInfo> InfoList(int PhotoID)
        {
            return dal.InfoList(PhotoID);
        }

        /// <summary>
        /// 取得相册圈人信息
        /// </summary>
        /// <param name="AlbumID">相册ID</param>
        /// <returns></returns>
        public List<PhotoLassoInfo> AlbumLasso(int AlbumID)
        {
            return dal.AlbumLasso(AlbumID);
        }
        /// <summary>
        /// 取得朋友被圈照片圈人信息
        /// </summary>
        /// <param name="PhotoID">用户ID</param>
        /// <returns></returns>
        public List<PhotoLassoInfo> FriendInfoList(int UserID)
        {
            return dal.FriendInfoList(UserID);
        }
        /// <summary>
        /// 取得某人被圈照片圈人信息
        /// </summary>
        /// <param name="UserID">照片用户</param>
        /// <param name="isSelf">是否在自己的相册中</param>
        /// <returns></returns>
        public List<PhotoLassoInfo> UserInfoList(int UserID,bool isSelf)
        {
            return dal.UserInfoList(UserID, isSelf);
        }
    }
}
