protected LiteFilter GetFilterForMultiColumns(string tableAlias, string fields, object o) { List <string> list = (from p in fields.Split(new char[] { ',' }) where !string.IsNullOrEmpty(p) select p).ToList <string>(); LiteFilter filter = LiteFilter.False(); foreach (string str in list) { filter = filter.Or(FilterField.New(tableAlias, str).Contains(o)); } return(filter); }
protected LiteFilter GetFilterForMultiValues(string tableAlias, string fieldName, object o) { List <int> list = (from p in Convert.ToString(o).Split(new char[] { ',' }) select p.ToIntNullable() into p where p.HasValue select p.Value).ToList <int>(); LiteFilter filter = LiteFilter.False(); foreach (int num in list) { filter = filter.Or(FilterField.New(tableAlias, fieldName).Equal(num)); } return(filter); }