Exemplo n.º 1
0
 public static void InsertBookmark(bookmarkext item)
 {
     try
     {
         var connection = new SQLiteConnection(Conn);
         connection.Open();
         string        sql     = string.Format("insert into bookmark (title, juz,surah,ayah) values ('{0}',{1},{2},{3})", item.title, item.juz, item.surah, item.ayah);
         SQLiteCommand command = new SQLiteCommand(sql, connection);
         command.ExecuteNonQuery();
         connection.Close();
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 2
0
 public static void DeleteBookmark(bookmarkext item)
 {
     try
     {
         var connection = new SQLiteConnection(Conn);
         connection.Open();
         string        sql     = string.Format("delete from bookmark where idx = {0}", item.idx);
         SQLiteCommand command = new SQLiteCommand(sql, connection);
         command.ExecuteNonQuery();
         connection.Close();
     }
     catch
     {
         throw;
     }
 }