private bool searchTermsContainedIn(ContentData content) { TextbasedContentData textContent = content as TextbasedContentData; if (textContent == null) { return(false); } foreach (string term in _currentFilter.SearchTerms) { if (textContent.Content.ToLower().Contains(term)) { return(true); } } return(false); }
private string createAddContentRequest(TextbasedContentData data, Guid entryID) { return("REPLACE INTO " + TABLE_NAME + " ( " + CONTENT_ID + ", " + CONTENT_TYP + ", " + CONTENT_INHALT + ", " + CONTENT_ENTRY_ID + " ) " + "VALUES ( '" + data.Id.ToString() + "', '" + (int)data.Type + "', '" + @data.Content + "', '" + entryID.ToString() + "' )"); }
private void addTextbasedContent(TextbasedContentData content, Guid entryID) { string command = createAddContentRequest(content, entryID); executeNonQuery(command); }