mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
Synchronization code
This commit is contained in:
parent
80d5a14b70
commit
1552785121
@ -746,7 +746,16 @@ namespace SqlSugar
|
||||
{
|
||||
var propertyName = kv.Key.Replace("SugarNav_", "");
|
||||
var propertyInfo = columns.First(i => i.PropertyName == propertyName).PropertyInfo;
|
||||
propertyInfo.SetValue(addItem, kv.Value);
|
||||
if (kv.Value is decimal &&UtilMethods.GetUnderType(propertyInfo.PropertyType).IsIn(typeof(int), typeof(long)))
|
||||
{
|
||||
|
||||
var changeValue = UtilMethods.ChangeType2(kv.Value, propertyInfo.PropertyType);
|
||||
propertyInfo.SetValue(addItem, changeValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
propertyInfo.SetValue(addItem, kv.Value);
|
||||
}
|
||||
}
|
||||
(outList as IList).Add(addItem);
|
||||
index++;
|
||||
|
Loading…
Reference in New Issue
Block a user