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


namespace JuSNS.Factory
{
    public interface IAsk
    {
        DataTable GetAskClass(int ParentID, int Num);
        DataTable GetXAskList(int Flag, int Num, int ClassID);
        int Add(JuSNS.Model.AskInfo ask, int rJiFen, int flg);
        int Del(int UserID, int ID);
        AskInfo GetAskInfo(int ID);
        void UpdateAskBest(int ID, int UserID);
        void UpdateAskClick(int ID);
        List<AskInfo> GetChildAskList(int ID);
        int GetChildCount(int UserID, int ID);
        int askClassAdd(int ParentID, string className);
        int DeleteAskClass(int ID);
        int EditInfo(int UserID, int qID, string Content);
    }

    public sealed partial class DataAccess
    {
        public static IAsk CreateAsk()
        {
            string className = path + ".Ask";
            return (IAsk)Assembly.Load(path).CreateInstance(className);
        }
    }
}
