private static string FormatFilterRightSide(string value, string operatorCode, FilterValueQuoteType quoteType)
        {
            if (operatorCode.ToUpperInvariant().IsIn("EQ", "NE", "LT", "LE", "GT", "GE"))
            {
                switch (quoteType)
                {
                case FilterValueQuoteType.None:
                    return(value);

                case FilterValueQuoteType.DateTime:
                    return(FormatFilterDateTimeValue(value));

                default:
                    return(FormatFilterStringValue(value));
                }
            }
            else
            {
                switch (operatorCode.ToUpperInvariant())
                {
                case "BW":
                case "BN":
                    return(FormatFilterStringValue(value, false, true));

                case "EW":
                case "EN":
                    return(FormatFilterStringValue(value, true, false));

                default:
                    return(FormatFilterStringValue(value, true, true));
                }
            }
        }
        private static string FormatFilterLeftSide(string field, string operatorCode, FilterValueQuoteType quoteType)
        {
            if (operatorCode.ToUpperInvariant().IsIn("BW", "BN", "EW", "EN", "CN", "NC"))
            {
                if (quoteType != FilterValueQuoteType.String)
                {
                    return(string.Format(CultureInfo.InvariantCulture, "Convert({0}, '{1}')", field, typeof(string).FullName));
                }
            }

            return(field);
        }