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

namespace JuSNS.Factory
{
    public interface IBill
    {
        DataTable BillPage(int UserID, int t, string r, string f, int classID, int PageIndex, int PageSize, out int RecordCount, out int PageCount);
        string GetClassName(int ClassID,int UserID);
        int addBill(int bID,int UserID, string bName, int bType, double bmoney, DateTime billTime, int ClassID, int fID, string Content, int isPub);
        string GetFamily(int fID,int UserID);
        IDataReader GetFamilyList(int UserID);
        IDataReader GetClassList(int UserID);
        IDataReader GetBillInfo(int UserID, int ID);
        int DelBillInfo(int UserID, int ID);
        int DelClassInfo(int UserID, int ID);
        int DelFamilyInfo(int UserID, int ID);
        int addbillClass(int UserID, string cName);
        int addbillfamily(int UserID, string cName);
        int EditbillClass(int UserID, string cName, int id);
        int EditbillFamily(int UserID, string cName, int id);
        double GetBillStat(int UserID, int Num);
    }

    public sealed partial class DataAccess
    {
        public static IBill CreateBill()
        {
            string className = path + ".Bill";
            return (IBill)Assembly.Load(path).CreateInstance(className);
        }
    }
}
