Exemple #1
0
 public Manage(LibraryManage lm)
 {
     libraryManage = lm;
     this.conn     = libraryManage.conn;
     user          = libraryManage.user;
     log           = libraryManage.log;
 }
Exemple #2
0
 protected Rights(LibraryManage lm)
 {
     libraryManage = lm;
     if (null != libraryManage)
     {
         conn = libraryManage.conn;
     }
 }
Exemple #3
0
 //重新连接数据库
 public void ReConn()
 {
     if (ConnectionState.Open == m_conn.getState())
     {
         m_conn.close();
         m_conn = new SQLiteConn(dbConnString);
         m_conn.open();
     }
 }
Exemple #4
0
 //初始化
 public void init()
 {
     m_user = new User();
     m_conn = new SQLiteConn(dbConnString);
     m_conn.open();
     //初始化日志类
     m_log = new Operation(m_conn);
     //功能模块初始化
     m_userManage   = new UserManage(this);
     m_bakManage    = new BakManage(this);
     m_dbLogManage  = new DBLogManage(this);
     m_readerManage = new ReaderManage(this);
     m_bookManage   = new BookManage(this);
     m_borrowManage = new BorrowManage(this);
 }
Exemple #5
0
        public IHttpActionResult Get()
        {
            DataBaseConn dbConn = new DataBaseConn();

            return(Ok(dbConn.getData()));// need to do: try and catch
        }