public Manage(LibraryManage lm) { libraryManage = lm; this.conn = libraryManage.conn; user = libraryManage.user; log = libraryManage.log; }
protected Rights(LibraryManage lm) { libraryManage = lm; if (null != libraryManage) { conn = libraryManage.conn; } }
//重新连接数据库 public void ReConn() { if (ConnectionState.Open == m_conn.getState()) { m_conn.close(); m_conn = new SQLiteConn(dbConnString); m_conn.open(); } }
//初始化 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); }
public IHttpActionResult Get() { DataBaseConn dbConn = new DataBaseConn(); return(Ok(dbConn.getData()));// need to do: try and catch }