static public Decimal GetExchangeRate(String CurrencyCode) { if (CurrencyCode.Length == 0) { throw new ArgumentException("Invalid CurrencyCode (empty string)"); } Decimal tmpS = System.Decimal.Zero; XmlNode n = RatesDoc.SelectSingleNode("//Currency[@CurrencyCode=" + CommonLogic.SQuote(CurrencyCode) + "]"); if (n != null) { tmpS = XmlCommon.XmlAttributeUSDecimal(n, "ExchangeRate"); } return(tmpS); }
static public String GetDisplaySpec(String CurrencyCode) { if (CurrencyCode.Length == 0) { throw new ArgumentException("Invalid CurrencyCode (empty string)"); } String tmpS = String.Empty; XmlNode n = RatesDoc.SelectSingleNode("//Currency[@CurrencyCode=" + CommonLogic.SQuote(CurrencyCode) + "]"); if (n != null) { tmpS = XmlCommon.XmlAttribute(n, "DisplaySpec"); } return(tmpS); }
static public int GetCurrencyID(String CurrencyCode) { if (CurrencyCode.Length == 0) { return(0); } int tmpS = 0; XmlNode n = RatesDoc.SelectSingleNode("//Currency[@CurrencyCode=" + CommonLogic.SQuote(CurrencyCode) + "]"); if (n != null) { tmpS = XmlCommon.XmlAttributeNativeInt(n, "CurrencyID"); } return(tmpS); }