using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using JuSNS.Model;
using System.Data;

namespace JuSNS.Factory
{
    public interface IHelp
    {
        //读取帮助
        DataTable getHelp(string ID);

        DataTable getHelpInfo(string ID);

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

        /// <summary>
        /// 删除帮助
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        int DeleteHelp(int ID);

    }

    public sealed partial class DataAccess
    {
        public static IHelp CreateHelp()
        {
            string className = path + ".Help";
            return (IHelp)Assembly.Load(path).CreateInstance(className);
        }
    }
}
