public void SQLAddItem(string entryId, ESQLItemType type, int accountId = 0, ESQLItemState itemState = ESQLItemState.Indexed)
 {
     var command = sqlData.CreateCommand(String.Format("INSERT OR IGNORE INTO Items (EntryId) VALUES (@EntryId); UPDATE Items SET AccountId={0}, ItemType={1} WHERE EntryId=@EntryId;", accountId, (int)type));
     command.Parameters.AddWithValue("@EntryId", entryId);
     sqlData.ExecuteNonQuery(command);
     sqlData.DisposeCommand(command);
 }
 public void SQLSetItemState(int itemId, ESQLItemState newState)
 {
     sqlData.ExecuteNonQuery(String.Format("UPDATE Items SET ItemState = {0} WHERE ItemId={1}", (int)newState, itemId));
 }
 public void SQLSetItemStateForFolderId(int folderId, ESQLItemState newState)
 {
     sqlData.ExecuteNonQuery(String.Format("UPDATE Items SET ItemState = {1} WHERE FolderId={0}", folderId, (int)newState));
 }
 public static string BuildSetDataSetItemStateForTagId(int tagId, ESQLItemState newState)
 {
     return String.Format("<data target=\"MailData\" content=\"ItemStateForTagId\" tagId=\"{0}\" newState=\"{1}\" />", tagId, (short)newState);
 }