Esempio n. 1
0
        public static string GetFormatString(SearchCondElementType type)
        {
            switch (type)
            {
                case SearchCondElementType.Equal:
                    return "{0} = {1}";
                case SearchCondElementType.Not:
                    return "Not {0}";
                case SearchCondElementType.Greater:
                    return "{0} > {1}";
                case SearchCondElementType.Less:
                    return "{0} < {1}";
                case SearchCondElementType.GreaterEqual:
                    return "{0} >= {1}";
                case SearchCondElementType.LessEqual:
                    return "{0} <= {1}";
                case SearchCondElementType.StartsWith:
                    return "{0} like '{1}%'";
                case SearchCondElementType.EndsWith:
                    return "{0} like '%{1}'";
                case SearchCondElementType.Contains:
                    return "{0} like '%{1}%'";
                case SearchCondElementType.Exists:
                    return "{0} Exists";
                case SearchCondElementType.Missing:
                    return "{0} Missing";
            }

            return string.Empty;
        }
Esempio n. 2
0
        public static string GetFormatString(SearchCondElementType type)
        {
            switch (type)
            {
            case SearchCondElementType.Equal: return("{0} = {1}");

            case SearchCondElementType.Not: return("Not {0}");

            case SearchCondElementType.Greater: return("{0} > {1}");

            case SearchCondElementType.Less: return("{0} < {1}");

            case SearchCondElementType.GreaterEqual: return("{0} >= {1}");

            case SearchCondElementType.LessEqual: return("{0} <= {1}");

            case SearchCondElementType.StartsWith: return("{0} like '{1}%'");

            case SearchCondElementType.EndsWith: return("{0} like '%{1}'");

            case SearchCondElementType.Contains: return("{0} like '%{1}%'");

            case SearchCondElementType.Exists: return("{0} Exists");

            case SearchCondElementType.Missing: return("{0} Missing");
            }
            return("");
        }