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;