private string GetPrefix(SqlPrefixType type) { switch (type) { case SqlPrefixType.AndSingle: return(" and "); case SqlPrefixType.OrSingle: return(" or "); case SqlPrefixType.AfterGroupByAnd: return(" and ( "); case SqlPrefixType.AfterGroupByOr: return(" or ( "); case SqlPrefixType.BeforeGroupByAnd: return(" ) and "); case SqlPrefixType.BeforeGroupByOr: return(" ) or "); case SqlPrefixType.EndByGroup: return(") "); default: return(" and "); } }
public IFilter AppendDefineItems(string Field, SqlPrefixType prefixType, FilterDataType dataType, CompareType compareType, object value) { SearchItem item = new SearchItem(Field, dataType, value); item.SqlPrefixType = prefixType; item.CompareType = compareType; AppendItems.Add(item); return(this); }