Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. IEnumerable<PropertyInfo> childrenProperties = entidade.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(model => model.PropertyType.Namespace == typeof(T).Namespace).ToArray();
  2.  
  3. foreach (var propertie in decimalPropertiesModel)
  4. {
  5. var value = propertie.GetValue(entidade, null);
  6.  
  7. if (value != null)
  8. {
  9. propertie.SetValue(entidade, decimal.Round((decimal)value, noCasasDecimais), null);
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement