mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Update GetConvertEnum_Null
This commit is contained in:
@@ -293,6 +293,17 @@ namespace SqlSugar
|
||||
return null;
|
||||
}
|
||||
object value = dr.GetValue(i);
|
||||
if (value != null)
|
||||
{
|
||||
if (value.GetType() == UtilConstants.DecType)
|
||||
{
|
||||
value = Convert.ToUInt32(value);
|
||||
}
|
||||
else if (value.GetType() == UtilConstants.StringType)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value.ObjToString());
|
||||
}
|
||||
}
|
||||
T t = (T)Enum.ToObject(typeof(T), value);
|
||||
return t;
|
||||
}
|
||||
|
Reference in New Issue
Block a user