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

namespace JuSNS.Home
{
    public class Help
    {
        private IHelp dal;
        /// <summary>
        /// 构造函数
        /// </summary>
        public Help()
        {
            dal = DataAccess.CreateHelp();
        }

        //读取帮助
        public DataTable getHelp(string ID)
        {
            return dal.getHelp(ID);
        }

        public DataTable getHelpInfo(string ID)
        {
            return dal.getHelpInfo(ID);
        }

        /// <summary>
        /// 添加修改帮助信息
        /// </summary>
        /// <param name="ID"></param>
        /// <param name="title"></param>
        /// <param name="Content"></param>
        /// <param name="flag">0：添加，1：修改</param>
        /// <returns></returns>
        public int UpdateAdd(JuSNS.Model.helpInfo info, int flag)
        {
            return dal.UpdateAdd(info, flag);
        }

        /// <summary>
        /// 删除帮助
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public int DeleteHelp(int ID)
        {
            return dal.DeleteHelp(ID);
        }

    }
}
