public static string zRepStrNoQuota(object Expression) { string n; try { if (Expression != null) { n = ExCast.zCStr(Expression); n = n.Replace("'", ""); n = n.Replace("\"", ""); n = n.Replace(@"\", @"\\"); n = n.Replace(";", ""); n = n.Replace(" * ", ""); n = n.Replace(",", ""); return(n); } else { return(""); } } catch { throw; } }
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); } }