public static void Write(this ColumnFilterProperty property, bool isLastProperty, PropertiesStyle style, CSideWriter writer) { writer.Write("{0}=", property.Name); writer.Indent(writer.Column); foreach (var line in property.Value) { var isLastLine = (line == property.Value.Last()); writer.WriteLine("{0}={1}({2}){3}", line.FieldName, line.Type.AsString(), line.Value, isLastLine ? ";" : ","); } writer.Unindent(); }
internal static void SetColumnFilterProperty(this ColumnFilterProperty property, string propertyValue) { // ColumnFilter=Lot_No=FILTER(<>''); while (!string.IsNullOrEmpty(propertyValue)) { var column = Parsing.MustMatch(ref propertyValue, @"^([^=]+)=").Groups[1].Value; var type = Parsing.MustMatch(ref propertyValue, @"^(CONST|FILTER)").Groups[1].Value.ToEnum <SimpleTableFilterType>(); var value = Parsing.MustMatch(ref propertyValue, @"^\(([^\)]*)\)").Groups[1].Value; property.Value.Add(new TableFilterLine(column, type, value)); } }