internal static decimal ToDecimal(object value) { return ((value == null || value == System.DBNull.Value) ? 0 : Convert.ToDecimal(value)); }