using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using JuSNS.Factory;
using JuSNS.Model;
using JuSNS.Config;

namespace JuSNS.Home
{
    public class ram
    {
        JuSNS.Factory.Iram dal;
        public ram()
        {
            dal = DataAccess.Createram();
        }

        /// <summary>
        /// 得到用户
        /// </summary>
        /// <param name="TN">0表示最新注册，1表示最后登录，2表示积分最多，3表示金币最多，4最活跃用户，5表示关注度最高，6推荐会员, 7表示随机, 8同城，9同城</param>
        /// <param name="Num">表示查询数量</param>
        /// <param name="ProID">TN为8，9时输入的省份地址或者城市</param>
        /// <param name="ProID">TN为8，9时输入的UserID</param>
        /// <param name="Sex">0所有，1男，2女</param>
        /// <returns></returns>
        public IDataReader GetUser(int TN, int Num, int ProID, int UserID, int Sex)
        {
            return dal.GetUser(TN, Num, ProID, UserID, Sex);
        }

        /// <summary>
        /// 调用所有的心情记录
        /// </summary>
        /// <param name="Num">数量 </param>
        /// <param name="by">0最新，1随机 </param>
        /// <returns></returns>
        public IDataReader GetMood(int Num,int By)
        {
            return dal.GetMood(Num, By);
        }

        /// <summary>
        /// 得到所有的日志
        /// </summary>
        /// <param name="Num">数量</param>
        /// <param name="by">0最新，1随机 </param>
        /// <returns></returns>
        public IDataReader GetBlog(int Num, int By)
        {
            return dal.GetBlog(Num,By);
        }

        /// <summary>
        /// 得到所有的分享
        /// </summary>
        /// <param name="Num"></param>
        /// <param name="by">0最新，1随机 </param>
        /// <returns></returns>
        public IDataReader GetShare(int Num, int By)
        {
            return dal.GetShare(Num,By);
        }

        /// <summary>
        /// 随便看看，相册
        /// </summary>
        /// <param name="Num"></param>
        /// <param name="by">0最新，1随机 </param>
        /// <param name="UserID">您的ID</param>
        /// <returns></returns>
        public DataTable GetAlbum(int Num, int By, int UserID)
        {
            return dal.GetAlbum(Num, By,UserID);
        }
    }
}
