mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
commit
db2dc3205c
@ -302,11 +302,12 @@ namespace SqlSugar
|
||||
object value = dr.GetValue(i);
|
||||
if (value != null)
|
||||
{
|
||||
if (value.GetType() == UtilConstants.DecType)
|
||||
var valueType = value.GetType();
|
||||
if (valueType.IsIn(UtilConstants.FloatType, UtilConstants.DecType, UtilConstants.DobType))
|
||||
{
|
||||
value = Convert.ToUInt32(value);
|
||||
}
|
||||
else if (value.GetType() == UtilConstants.StringType)
|
||||
else if (valueType == UtilConstants.StringType)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value.ObjToString());
|
||||
}
|
||||
@ -320,11 +321,12 @@ namespace SqlSugar
|
||||
object value = dr.GetValue(i);
|
||||
if (value != null)
|
||||
{
|
||||
if (value.GetType() == UtilConstants.DecType)
|
||||
var valueType = value.GetType();
|
||||
if (valueType.IsIn(UtilConstants.FloatType, UtilConstants.DecType, UtilConstants.DobType))
|
||||
{
|
||||
value = Convert.ToUInt32(value);
|
||||
}
|
||||
else if (value.GetType() == UtilConstants.StringType)
|
||||
else if (valueType == UtilConstants.StringType)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value.ObjToString());
|
||||
}
|
||||
|
@ -302,11 +302,12 @@ namespace SqlSugar
|
||||
object value = dr.GetValue(i);
|
||||
if (value != null)
|
||||
{
|
||||
if (value.GetType() == UtilConstants.DecType)
|
||||
var valueType = value.GetType();
|
||||
if (valueType.IsIn(UtilConstants.FloatType, UtilConstants.DecType, UtilConstants.DobType))
|
||||
{
|
||||
value = Convert.ToUInt32(value);
|
||||
}
|
||||
else if (value.GetType() == UtilConstants.StringType)
|
||||
else if (valueType == UtilConstants.StringType)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value.ObjToString());
|
||||
}
|
||||
@ -320,11 +321,12 @@ namespace SqlSugar
|
||||
object value = dr.GetValue(i);
|
||||
if (value != null)
|
||||
{
|
||||
if (value.GetType() == UtilConstants.DecType)
|
||||
var valueType = value.GetType();
|
||||
if (valueType.IsIn(UtilConstants.FloatType, UtilConstants.DecType, UtilConstants.DobType))
|
||||
{
|
||||
value = Convert.ToUInt32(value);
|
||||
}
|
||||
else if (value.GetType() == UtilConstants.StringType)
|
||||
else if (valueType == UtilConstants.StringType)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value.ObjToString());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user