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

namespace JuSNS.Factory
{
    public interface INotepad
    {
        IDataReader GetContent(int UserID, int NoteID);
        int SaveNote(int UserID, string title, string Content, DateTime txtime, int flg, int noteID);
        NotePadInfo GetNoteInfo(int NoteID);
        int DelNote(int UserID, int NoteID);
        /// <summary>
        /// 检查是否有查看的权限
        /// </summary>
        /// <param name="guest"></param>
        /// <param name="masterid"></param>
        /// <returns></returns>
        bool Authority(int guest, int masterid);
    }
    public sealed partial class DataAccess
    {
        public static INotepad CreateNotepad()
        {
            string className = path + ".Notepad";
            return (INotepad)Assembly.Load(path).CreateInstance(className);
        }
    }
}
