public void Add(DictionarySearchParameters p) { var sqlItems = new SqlItemList(); sqlItems.Add(new SqlItem("dKey", p.Key)); sqlItems.Add(new SqlItem("Value", p.Value)); SetInsertIntoSql(SynnDataProvider.TableNames.UserDictionary, sqlItems); ExecuteSql(); }
public List <DictionaryItem> PerformSearch(DictionarySearchParameters p) { SetSqlFormat("select * from {0}", SynnDataProvider.TableNames.UserDictionary); ClearParameters(); if (!string.IsNullOrEmpty(p.SearchText)) { StartORGroup(); AddORLikeField("dKey", p.SearchText, LikeSelectionStyle.CheckBoth); AddORLikeField("Value", p.SearchText, LikeSelectionStyle.CheckBoth); EndORGroup(); } var lst = new List <DictionaryItem>(); FillList(lst, typeof(DictionaryItem)); return(lst); }