Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }