コード例 #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();
     }
 }
コード例 #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();
     }
 }
コード例 #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;
             }
         }
     }
 }
コード例 #4
0
 // Close database connection
 private void closeDBconnection()
 {
     conn.Commit();
     conn.Dispose();
     conn.Close();
 }
コード例 #5
0
 //fecha conexao SqlLite
 public void Dispose()
 {
     _conexao.Dispose();
 }
コード例 #6
0
 public void Dispose()
 {
     _connection.Dispose();
 }