Beispiel #1
0
 public static string GetCurrency(object obj)
 {
     return((ConvertUtil.ChangeTypeSafe <string>(obj) ?? string.Empty).Trim().Replace(",", "."));
 }
Beispiel #2
0
 public static DateTime GetDateTime(object obj)
 {
     return(ConvertUtil.ChangeTypeSafe <DateTime>(obj));
 }
Beispiel #3
0
 public static object GetDateTimeNull(object value)
 {
     //return GetValueNull(GetDateTime(value), DefaultDateTime);
     return(ConvertUtil.DbNullIfDefault(GetDateTime(value)));
 }
Beispiel #4
0
 public static decimal GetDecimal(object obj)
 {
     //return (decimal)GetValue(obj, decimal.Zero);
     return(ConvertUtil.ChangeTypeSafe <decimal>(obj));
 }
Beispiel #5
0
 public static object GetDecimalNull(object value)
 {
     //return GetValueNull(GetDecimal(value), decimal.Zero);
     return(ConvertUtil.DbNullIfDefault(GetDecimal(value)));
 }
Beispiel #6
0
 public static double GetDouble(object obj)
 {
     //return (double)GetValue(obj, (double)0);
     return(ConvertUtil.ChangeTypeSafe <double>(obj));
 }
Beispiel #7
0
 public static object GetDoubleNull(object value)
 {
     //return GetValueNull(GetDouble(value), (double)0);
     return(ConvertUtil.DbNullIfDefault(GetDouble(value)));
 }
Beispiel #8
0
 public static object GetStringNull(object value)
 {
     return(ConvertUtil.DbNullIf(GetString(value), string.Empty));
 }
Beispiel #9
0
 public static string GetString(object obj)
 {
     return(ConvertUtil.ChangeTypeSafe <string>(obj) ?? string.Empty);
 }
Beispiel #10
0
 public static bool GetBool(object obj)
 {
     //return (bool)GetValue(GetBool(Convert.ToString(obj)), false);
     return(ConvertUtil.ChangeTypeSafe <bool>(GetBool(ConvertUtil.ChangeTypeSafe <string>(obj))));
 }
Beispiel #11
0
 public static object GetIntNull(object value)
 {
     //return GetValueNull(GetInt(value), (int)0);
     return(ConvertUtil.DbNullIfDefault(GetInt(value)));
 }
Beispiel #12
0
 public static int GetInt(object obj)
 {
     //return (int)GetValue(obj, (int)0);
     return(ConvertUtil.ChangeTypeSafe <int>(obj));
 }