public static Filter DecodeFilter(Expression exp) { var sql = new WebEasFilterExpression(); var filter = sql.Visit(exp); if (filter == null) { return(null); } if (filter is FilterElement) { return(new Filter((FilterElement)filter)); } //otherwise return(filter as Filter); }
public HierarchyNode(string kod, string nazov, Expression <Func <T, bool> > filter, string typ = HierarchyNodeType.Unknown, string icon = HierarchyNodeIconCls.Unknown, bool crossModulItem = false) : base(kod, nazov, typeof(T), WebEasFilterExpression.DecodeFilter(filter), typ, icon, PfeSelection.Single, crossModulItem) { }