Example #1
0
 //Delete all contactlist or delete Contacts table
 public void DeleteAllContact()
 {
     using (SQLite.Net.SQLiteConnection conn = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH))
     {
         conn.DropTable <Contacts>();
         conn.CreateTable <Contacts>();
         conn.Dispose();
         conn.Close();
     }
 }
Example #2
0
 private static void ExcluirTodasGastoCnpj()
 {
     using (SQLite.Net.SQLiteConnection conexao = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH))
     {
         conexao.DropTable <GastoCnpj>();
         conexao.CreateTable <GastoCnpj>();
         conexao.Dispose();
         conexao.Close();
     }
 }
Example #3
0
 private static void ExcluirTodosOsDeputados()
 {
     using (SQLite.Net.SQLiteConnection conexao = new SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH))
     {
         for (int i = 0; i <= 10; i++)
         {
             try
             {
                 conexao.DropTable <Deputado>();
                 conexao.CreateTable <Deputado>();
                 conexao.Dispose();
                 conexao.Close();
                 break;
             }
             catch
             {
                 Task.Delay(5000);
                 break;
             }
         }
     }
 }
Example #4
0
 // Close database connection
 private void closeDBconnection()
 {
     conn.Commit();
     conn.Dispose();
     conn.Close();
 }