private void btnAddReview_Click(object sender, EventArgs e) { if (!listReviewPhraseBook.Any(p => p.WordSourceName == lblPhrase.Text)) { listReviewPhraseBook.Add(new PhraseBook { WordSourceName = lblPhrase.Text }); phraseDb.SaveReviewPhrasesToDb(listReviewPhraseBook); } }
private void SavePhraseByeState() { switch (phraseStatus) { case PhraseStatus.Phrase: phraseDb.SavePhrasesToDb(listPhrase); break; case PhraseStatus.Review: phraseDb.SaveReviewPhrasesToDb(listReviewPhraseBook); break; case PhraseStatus.Done: phraseDb.SaveDonePhrasesToDb(listDonePhraseBook); break; default: break; } }