Example #1
0
 public void CreateWhiteListDB()
 {
     NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName);
     sql.ExecuteNonQuery(Properties.Settings.Default.DBCreateWhiteListTable);
 }
Example #2
0
 private void UpdateWhiteListTable(DataTable dt)
 {
     NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName);
     sql.UpdateDatatableQuery(dt, Properties.Settings.Default.DBSelectWhiteListTable);
 }
Example #3
0
 public List<Int64> SelectWhiteList()
 {
     List<Int64> idList = new List<Int64>();
     NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName);
     DataTable res = sql.SelectQuery(Properties.Settings.Default.DBSelectWhiteListTable);
     if (res.Rows.Count > 0)
     {
         idList = res.Rows.Cast<Int64>().ToList();
     }
     return idList;
 }
Example #4
0
 private DataTable SelectWhiteListTable()
 {
     NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName);
     return sql.SelectQuery(Properties.Settings.Default.DBSelectWhiteListTable);
 }
Example #5
0
 public String SelectUserNickname(Int64 id)
 {
     NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName);
     DataTable res = sql.SelectQuery(Properties.Settings.Default.DBSelectUserTable);
     DataRow row = res.Rows.Find(id);
     if (row == null) return "";
     return row["nick_name"].ToString();
 }