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

namespace JuSNS.ApiInterface
{
    /// <summary>
    /// 用户工具类
    /// </summary>
    public class UtilUser
    {
        static private IUtilUser dal;
        static UtilUser()
        {
            dal = DataAccess.CreateUtilUser();
        }
        /// <summary>
        /// 添加应用
        /// </summary>
        /// <param name="UserID"></param>
        /// <param name="AppID"></param>
        /// <returns></returns>
        static public int AddApp(int UserID, int AppID)
        {
            return dal.AddApp(UserID, AppID);
        }
        /// <summary>
        /// 删除某应用
        /// </summary>
        /// <param name="UserID"></param>
        /// <param name="AppID"></param>
        /// <returns></returns>
        static public int DeleteApp(int UserID, int AppID)
        {
            return dal.DeleteApp(UserID, AppID);
        }
        /// <summary>
        /// 取得用户的应用程序
        /// </summary>
        /// <param name="UserID">用户ID</param>
        /// <returns></returns>
        static public List<AppInfo> GetUserApp(int UserID)
        {
            return dal.GetUserApp(UserID);
        }
    }
}
