Ejemplo n.º 1
0
 private void InsertClicked()
 {
     db.DeleteAll <DBList>();
     for (int i = 0; i < 300; i++)
     {
         DBList list = new DBList();
         list.ID      = i;
         list.Content = "Item " + i;
         db.Insert(list);
         if (i == 299)
         {
             foreach (var entry in db.Table <DBList>())
             {
                 dbList.Add(new DBList {
                     ID = entry.ID, Content = entry.Content
                 });
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void DeleteBtn_Click(object sender, RoutedEventArgs e)
 {
     listView.Items.Clear();
     connection.DeleteAll <AddTrip>();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Deletes every card in genereatedCards.
        /// </summary>
        public void ClearGeneratedCards()
        {
            using (SQLite.Net.SQLiteConnection db = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.path))
            {
                int size = db.Table<GeneratedCards>().Count();

                if (size > 0)
                {
                    IEnumerable<GeneratedCards> entityQuery = db.Table<GeneratedCards>().ToList();
                    db.DeleteAll<GeneratedCards>();
                }
            }

        }
Ejemplo n.º 4
0
 public void DeleteAll <T>()
 {
     _conexao.DeleteAll <T>();
 }