Exemplo n.º 1
0
 /// <summary>
 /// Adds notification to history database.
 /// </summary>
 void addNotificationToHistory(string[] input)
 {
     var db = new SQLiteDatabase();
     db.ExecuteNonQuery(@"CREATE TABLE IF NOT EXISTS history (title, subtitle, message, time);");
     string tmpinsert = String.Format(@"INSERT INTO history VALUES ('{0}', '{1}', '{2}', '{3}');", input[2], input[3], input[4], input[6]);
     db.ExecuteNonQuery(tmpinsert);
 }
Exemplo n.º 2
0
 private void menuItemClick(object sender, RoutedEventArgs e)
 {
     var db = new SQLiteDatabase();
     db.ClearTable("history");
     DataTable result = db.GetDataTable("SELECT * FROM history;");
     dataGrid1.ItemsSource = result.DefaultView;
 }
Exemplo n.º 3
0
 private void windowLoaded(object sender, RoutedEventArgs e)
 {
     var db = new SQLiteDatabase();
     DataTable result = db.GetDataTable("SELECT * FROM history;");
     dataGrid1.ItemsSource = result.DefaultView;
 }