public static Boolean FormatBoolean(object value) { if (value != null && value.Equals(DBNull.Value) == false && value.ToString().Length > 0) { return(Boolean.Parse(UtilityLib.FormatString(value))); } else { return(false); } }
public static DateTime?FormatDateForNullable(object value) { if (value != null && value.Equals(DBNull.Value) == false && value.ToString().Length > 0) { return(DateTime.Parse(UtilityLib.FormatString(value))); } else { return(null); } }