public bool UpdateVerse(Verse verse) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verse.Title)) { database.UpdateVerse(verse); return(true); } return(false); } }
public bool UpdateVerse(string verseTitle) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verseTitle)) { var verse = database.GetVerse(verseTitle); database.UpdateVerse(verse); return(true); } return(false); } }
public bool UpdateVerseMemorizationEnabled(string verseTitle, bool enabled) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verseTitle)) { var verse = database.GetVerse(verseTitle); verse.Memorizable = true; database.UpdateVerse(verse); return(true); } return(false); } }
public bool MoveVerseToCategory(int verseId, MemorizationCategory category) { using (var database = new VersesSQLiteConnection(Path)) { if (database.VerseExists(verseId)) { var verse = database.GetVerse(verseId); verse.Category = category; database.UpdateVerse(verse); return(true); } return(false); } }