public void CreateWhiteListDB() { NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName); sql.ExecuteNonQuery(Properties.Settings.Default.DBCreateWhiteListTable); }
private void UpdateWhiteListTable(DataTable dt) { NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName); sql.UpdateDatatableQuery(dt, Properties.Settings.Default.DBSelectWhiteListTable); }
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; }
private DataTable SelectWhiteListTable() { NTLIB.SQLite3 sql = new NTLIB.SQLite3(this.FileName); return sql.SelectQuery(Properties.Settings.Default.DBSelectWhiteListTable); }
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(); }