locked
change ads price from $ to £ RRS feed

  • Question

  • User-1933098080 posted

     how do i change ads currency from dollar $ to Ponuds £

    Friday, July 24, 2009 5:05 AM

All replies

  • User-1026295734 posted

    The CultureInfo and RegionInfo classes both include information on currency. Only one currency is specified per culture. The euro is the official currency of Belgium, Germany, Spain, France, Ireland, Italy, Luxembourg, Netherlands, Austria, Portugal, Finland, and Greece. On January 1, 2002, these nations started using euro bank notes and coins. Therefore, the .NET Framework and Microsoft Windows XP set the default currency symbol to the euro for these twelve nations. Older versions of Windows still set the default currency symbol to the local currency for these nations.

    above para from an MSDN Article

    CultureInfo bz = new CultureInfo("fr-FR");
            decimal money = 1500.40m;
            string value = String.Format(bz,"Euro Total: {0:C}", money);
            Response.Write(value);


    Real time values

    http://www.cprogrammingtrends.com/cprogrammingtrends-43-20070104CRealtimeCurrencyExchangeClass.html

    http://www.sourcecodeonline.com/list?q=programming_code_of_dollar_conversion

    Friday, July 24, 2009 6:27 AM
  • User-382622159 posted

     It is possible to change all those displayed in headers and ads by looking at the source code of each page concerned.

    Friday, August 28, 2009 5:50 PM
  • User2003259384 posted

    I find the following workarround, I'm not sure that is one easy , but is working
    1) I changed in all tables and procedure where there is
     Price money
     to
     Price decimal (18,2)
      (could be used something else)

     Basically I changed in ads table and in procedures: GetAllAdsByQuery, InsertAd, RelistAd
     UpdateAd (check in db if there is necessary in others , but looks that is in my case)

    2) changed in files where money is used to be decimal(18,2)
     changed also in files
     currency ---> to decimal , allover where is used

    3) where there is in format like
    String.Format("{0:c}", ad.Price);
    to something like
    AdPriceLabel.Text = String.Format("EUR {0:0.00}", ad.Price);

    here {0:c} --> c is for currency
    but as I changed to EUR , it is 0:0.00
    in "EUR {0:0.00}"  ---> EUR is just a string

    This is working , but sure there is no real conversion , it is
    only displayed in EUR , you need to enter all Ads with prices in EUR from start

    You can make similar for £

     

    Observation

    It is possible to work just making step 3) only

    Thursday, December 31, 2009 10:42 AM