Exemplo n.º 1
0
        public string ConvertToText(double amt)
        {
            CurrencyInfo Currency = new CurrencyInfo(CurrencyInfo.Currencies.SaudiArabia);

            try
            {
                ToText totext = new ToText((Decimal)amt, Currency);
                return(totext.ConvertToArabic());
            }
            catch
            {
                return("");
            }
        }
Exemplo n.º 2
0
        public string FromTextToText(string amt)
        {
            CurrencyInfo Currency = new CurrencyInfo(CurrencyInfo.Currencies.SaudiArabia);

            try
            {
                Decimal DAmt;
                Decimal.TryParse(amt, out DAmt);
                ToText totext = new ToText(DAmt, Currency);
                return(totext.ConvertToArabic());
            }
            catch
            {
                return("");
            }
        }