public static string GetStringValue(object value) { if (value != null) { if (value is bool) { return(((bool)value) ? "1" : "0"); } if (value is double) { return(MFunc.DoubleToString((double)value)); } else if (value is decimal) { return(MFunc.DecimalToString((decimal)value)); } else if (value is DateTime) { return(MFunc.DateToString((DateTime)value)); } else { return(value.ToString()); } } return(null); }