Exemplo n.º 1
0
        public static void GetWhere(LinkType linkType, string columnName, object value, LogicalOperatorType logicalOperatorType, ref StringBuilder stringBuilder)
        {
            switch (value.GetType().Name)
            {
            case "String":
            case "DateTime":
                stringBuilder.Append(linkType.GetLinkStr() + columnName + logicalOperatorType.GetLogicalOperatorStr() + "'" + value + "'" + logicalOperatorType.LogicalOperatorAppend() + linkType.LinkAppend());
                break;

            case "Double":
            case "Decimal":
            case "Single":
                stringBuilder.Append(linkType.GetLinkStr() + columnName + logicalOperatorType.GetLogicalOperatorStr() + value + logicalOperatorType.LogicalOperatorAppend() + linkType.LinkAppend());
                break;
            }
        }