Пример #1
0
        internal static string GetCalcFormulaFilterValue(ref string value)
        {
            Parsing.MustMatch(ref value, @"^\(");
            return(Parsing.MatchUntilUnnested(ref value, ')', '('));

            // return Parsing.MatchUntil(ref value, ')', '\'');
        }
Пример #2
0
        internal static string GetTableViewSorting(ref string propertyValue)
        {
            if (Parsing.TryMatch(ref propertyValue, @"^SORTING\("))
            {
                return(Parsing.MatchUntilUnnested(ref propertyValue, ')', '('));
            }

            return(null);
        }
Пример #3
0
 internal static void SetReportDataItemLinkProperty(this ReportDataItemLinkProperty property, string propertyValue)
 {
     do
     {
         var fieldName          = Parsing.MustMatch(ref propertyValue, @"^([^=]+)=FIELD\(").Groups[1].Value;
         var referenceFieldName = Parsing.MatchUntilUnnested(ref propertyValue, ')', '(');
         //var referenceFieldName = Parsing.MustMatch(ref propertyValue, @"^([^)]+)\)").Groups[1].Value;
         property.Value.Add(new ReportDataItemLinkLine(fieldName, referenceFieldName));
     }while (Parsing.TryMatch(ref propertyValue, @"^,\s?"));
 }
Пример #4
0
        internal static void SetObjectLinkProperty(this RunObjectLinkProperty property, string propertyValue)
        {
            //			Payment Term=FIELD(Code);

            while (propertyValue.Length > 0)
            {
                var fieldName = Parsing.MustMatch(ref propertyValue, @"^([^=]+)=").Groups[1].Value;
                var type      = Parsing.MustMatch(ref propertyValue, @"(CONST|FILTER|FIELD)").Groups[1].Value.ToEnum <TableFilterType>();
                Parsing.MustMatch(ref propertyValue, @"^\(");
                var value = Parsing.MatchUntilUnnested(ref propertyValue, ')', '(');

                property.Value.Add(new RunObjectLinkLine(fieldName, type, value));

                Parsing.TryMatch(ref propertyValue, @"^,\s?");
            }
        }
Пример #5
0
        internal static List <TableRelationFilterLine> GetTableRelationFilters(ref string propertyValue)
        {
            var result = new List <TableRelationFilterLine>();

            if (!Parsing.TryMatch(ref propertyValue, @"^\s?WHERE\s?\("))
            {
                return(result);
            }

            do
            {
                var fieldName = Parsing.MustMatch(ref propertyValue, @"^([^=]+)=").Groups[1].Value;
                var type      = Parsing.MustMatch(ref propertyValue, @"(CONST|FILTER|FIELD)").Groups[1].Value;
                Parsing.MustMatch(ref propertyValue, @"^\(");
                var value = Parsing.MatchUntilUnnested(ref propertyValue, ')', '(');
                // var value = Parsing.MustMatch(ref propertyValue, @"\(([^\)]*)\)").Groups[1].Value;
                result.Add(new TableRelationFilterLine(fieldName, type, value, false, false));
            }while (Parsing.TryMatch(ref propertyValue, @"^,\s?"));

            Parsing.MustMatch(ref propertyValue, @"^\)");

            return(result);
        }