hutongqing
2024-11-27 7ff298c6834275b63b612af49651673689a39660
WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/UtilConvert.cs
@@ -75,6 +75,10 @@
        {
            int reval = 0;
            if (thisValue == null) return 0;
            if (thisValue is Enum && thisValue != DBNull.Value && Enum.TryParse(thisValue.GetType(), thisValue.ToString(), out var val))
            {
                return Convert.ToInt32(val.ChangeType(typeof(int)));
            }
            if (thisValue != DBNull.Value && int.TryParse(thisValue.ToString(), out reval))
            {
                return reval;
@@ -411,15 +415,22 @@
            switch (stringType)
            {
                case HtmlElementType.Contains:
                case HtmlElementType.selectlist:
                case nameof(HtmlElementType.Contains):
                    linqExpression = LinqExpressionType.In;
                    break;
                case HtmlElementType.ThanOrEqual:
                case nameof(HtmlElementType.ThanOrEqual):
                case HtmlElementType.thanorequal:
                    linqExpression = LinqExpressionType.ThanOrEqual;
                    break;
                case HtmlElementType.LessOrequal:
                case HtmlElementType.LessOrEqual:
                case nameof(HtmlElementType.LessOrEqual):
                case HtmlElementType.lessorequal:
                    linqExpression = LinqExpressionType.LessThanOrEqual;
                    break;
                case HtmlElementType.GT:
                case nameof(HtmlElementType.GT):
                    linqExpression = LinqExpressionType.GreaterThan;
                    break;
                case HtmlElementType.lt: