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

namespace JuSNS.Factory
{
    public interface IGift
    {
        DataTable GiftListPage(int UserID,string classID,string n, int PageIndex, int PageSize, out int RecordCount, out int PageCount);
        IDataReader GiftInfo(int ID);
        IDataReader GiftUserInfo(int ID);
        int SaveGift(int UserID, int gID, int SendUserID, int pType, string Content, DateTime CreatTime);
        DataTable ShowGiftList(string t, int UserID, int PageIndex, int PageSize, out int RecordCount, out int PageCount);
        int DelGift(int UserID, int ID);
        IDataReader GetGiftClass();
        DataTable getGiftClassID(int ID);
        int LockGift(int ID, int flg, int isdel);
        int addGift(string GName, string Picture, int point, string Content, int ClassID, int GID);
        int UpdateGiftClassID(string className, int id);
        DataTable GetGiftClassT();
        int DelGiftClass(int id);
    }

    public sealed partial class DataAccess
    {
        public static IGift CreateGift()
        {
            string className = path + ".Gift";
            return (IGift)Assembly.Load(path).CreateInstance(className);
        }
    }
}
