public static string zFormatForID(object Expression, int maxLengthB) { string str = ""; try { str = ExCast.zCStr(Expression); if (string.IsNullOrEmpty(str)) { return(""); } if (maxLengthB == 0) { return(""); } if (ExCast.IsNumeric(str) == false) { return(str); } string str0 = ""; for (int i = 1; i <= maxLengthB; i++) { str0 += "0"; } return(ExCast.zCDbl(str).ToString(str0)); } catch { return(str); } }
public static string zNumZeroNothingFormat(object Expression) { string _id = ""; try { _id = zCStr(Expression); if (ExCast.IsNumeric(_id)) { _id = ExCast.zCDbl(_id).ToString(); } } catch { _id = zCStr(Expression); } return(_id); }
public static string zIdForNumIndex(object Expression) { string _id = ""; try { _id = zCStr(Expression); if (ExCast.IsNumeric(_id)) { _id = ExCast.zCDbl(_id).ToString(); } else { _id = "999999999999999"; } } catch { _id = zCStr(Expression); } return(_id); }