在Dynamics CRM中,如果我们要添加一条Currency记录的话.
可选择的Currency Type有<System> ,<Custorm>两种.
如果选择的是<System>,那么,点击 Currency Code,则会弹出一个Currency List 页面让我们选择.
但需要注意的一点是,这个List页面的数据源,貌似并不存在于数据库中
嗯...大概是一个XML文件..
至于这个XML文件是什么,我也没仔细去找..
但我直接把这个页面的数据抠了下来..
private ListGetCurrencyBaseList() { string allCurrencies = @"Afghanistan|افغانى|AFN|؋|2|Afghanistan|افغانۍ|AFN|؋|0|Albania|Leku shqiptar|ALL|Lekë|0|Algeria|دينار جزائري|DZD|د.ج.|2|Algeria|Dinar|DZD|DA|2|Argentina|peso argentino|ARS|$|2|Armenia|դրամ|AMD|֏|2|Australia|Australian Dollar|AUD|$|2|Austria|Euro|EUR|€|2|Azerbaijan|Aзәрбајҹан манаты|AZN|₼|2|Azerbaijan|Azərbaycan Manatı|AZN|₼|2|Bahrain|دينار بحريني|BHD|د.ب.|3|Bangladesh|টাকা|BDT|৳|2|Belarus|беларускі рубель|BYN|Br|2|Belgium|euro|EUR|€|2|Belize|Belize Dollar|BZD|$|2|Bhutan|དངུལ་ཀྲམ|BTN|Nu.|2|Bolivarian Republic of Venezuela|bolívar venezolano|VEF|Bs.|2|Bolivia|boliviano|BOB|Bs|2|Bolivia|Boliviano|BOB|Bs.|2|Bosnia and Herzegovina|конвертибилна марка|BAM|КМ|2|Bosnia and Herzegovina|Bosansko-Hercegovačka konvertibilna marka|BAM|KM|2|Bosnia and Herzegovina|konvertibilna marka|BAM|KM|2|Bosnia and Herzegovina|Bosansko-hercegovačka konvertibilna marka|BAM|KM|2|Botswana|Botswanan Pula|BWP|P|2|Brazil|Real|BRL|R$|2|Brunei Darussalam|Dolar Brunei|BND|$|2|Bulgaria|български лев|BGN|лв.|2|Cambodia|x179Aៀល|KHR|៛|2|Cameroon|franc CFA (BEAC)|XAF|FCFA|0|Canada|Canadian Dollar|CAD|$|2|Canada|Dollar canadien|CAD|$|2|Canada|ᑲᓇᑕᐅᑉ ᑮᓇᐅᔭᖓ|CAD|$|2|Canada|Kanataup Kiinaujanga|CAD|$|2|Caribbean|Eastern Caribbean Dollar|XCD|EC$|2|Caribbean|US Dollar|USD|$|2|Chile|Peso|CLP|$|2|Chile|Peso chileno|CLP|$|0|Colombia|peso colombiano|COP|$|0|Congo (DRC)|franc congolais|CDF|FC|2|Costa Rica|colón costarricense|CRC|₡|0|Côte d’Ivoire|franc CFA (BCEAO)|XOF|CFA|0|Croatia|hrvatska kuna|HRK|kn|2|Cuba|peso cubano|CUP|$|2|Czech Republic|česká koruna|CZK|Kč|2|Denmark|Dansk krone|DKK|kr.|2|Dominican Republic|peso dominicano|DOP|$|2|Ecuador|dólar estadounidense|USD|$|2|Ecuador|Dolar americano|USD|$|2|Egypt|جنيه مصري|EGP|ج.م.|2|El Salvador|dólar estadounidense|USD|$|2|Eritrea|Eritrean Nakfa|ERN|Nfk|2|Estonia|euro|EUR|€|2|Ethiopia|የኢትዮጵያ ብር|ETB|ብር|2|Ethiopia|Itoophiyaa Birrii|ETB|Br|2|Ethiopia|የኢትዮጵያ ብር|ETB|Br|2|Faroe Islands|donsk króna|DKK|kr|2|Finland|euro|EUR|€|2|France|euro|EUR|€|2|France|euru|EUR|€|2|France|èuro|EUR|€|2|Georgia|ქართული ლარი|GEL|₾|2|Germany|Euro|EUR|€|2|Germany|euro|EUR|€|2|Greece|ευρώ|EUR|€|2|Greenland|kuruuni|DKK|kr.|2|Guatemala|quetzal|GTQ|Q|2|Guatemala|Quetzal|GTQ|Q|2|Haiti|gourde haïtienne|HTG|G|2|Honduras|lempira hondureño|HNL|L|2|Hong Kong S.A.R.|Hong Kong Dollar|HKD|$|2|Hong Kong S.A.R.|港幣|HKD|HK$|2|Hungary|magyar forint|HUF|Ft|2|Iceland|íslensk króna|ISK|ISK|0|India|টকা|INR|₹|2|India|টাকা|INR|₹|2|India|Rupee|INR|₹|2|India|રૂપિયો|INR|₹|2|India|रुपया|INR|₹|2|India|ರೂಪಾಯಿ|INR|₹|2|India|रुपय|INR|₹|2|India|ഇന്ത്യൻ രൂപ|INR|₹|2|India|भारतीय रूपिँया|INR|₹|2|India|ଟଙ୍କା|INR|₹|2|India|ਰੁਪਿਆ|INR|₹|2|India|रूप्यकह:|INR|₹|2|India|ரூபாய்|INR|₹|2|India|రూపాయి|INR|₹|2|India|انڈین روپیہ|INR|₹|2|Indonesia|Rupiah|IDR|Rp|0|Indonesia|Rupiah Indonesia|IDR|Rp|0|Iran|ریال|IRR|ريال|2|Iraq|دينار عراقي|IQD|د.ع.|2|Iraq|دیناری عێراقی|IQD|د.ع.|2|Ireland|Euro|EUR|€|2|Islamic Republic of Pakistan|روپيه|PKR|Rs|2|Israel|שקל חדש|ILS|₪|2|Italy|euro|EUR|€|2|Jamaica|Jamaican Dollar|JMD|$|2|Japan|円|JPY|¥|0|Jordan|دينار اردني|JOD|د.ا.|3|Kazakhstan|Қазақстан теңгесі|KZT|₸|2|Kenya|Shilingi ya Kenya|KES|Ksh|2|Korea|원|KRW|₩|0|Kuwait|دينار كويتي|KWD|د.ك.|3|Kyrgyzstan|сом|KGS|сом|2|Lao P.D.R.|ລາວ ກີບ|LAK|₭|0|Latin America|derechos especiales de giro|XDR|XDR|2|Latvia|eiro|EUR|€|2|Lebanon|ليرة لبناني|LBP|ل.ل.|2|Libya|دينار ليبي|LYD|د.ل.|3|Liechtenstein|Schweizer Franken|CHF|CHF|2|Lithuania|Euras|EUR|€|2|Luxembourg|Euro|EUR|€|2|Luxembourg|euro|EUR|€|2|Macao S.A.R.|澳門幣|MOP|MOP|2|Macedonia (FYROM)|Македонски денар|MKD|ден|2|Malaysia|Ringgit Malaysia|MYR|RM|2|Maldives|ރުފިޔާ|MVR|ރ.|2|Mali|franc CFA (BCEAO)|XOF|CFA|0|Malta|ewro|EUR|€|2|Mexico|Peso|MXN|$|2|Moldova|leu moldovenesc|MDL|L|2|Moldova|Молдавский лей|MDL|L|2|Mongolia|төгрөг|MNT|₮|0|Mongolia|ᠲᠥᠭᠦᠷᠢᠭ᠌|MNT|₮|2|Montenegro|евро|EUR|€|2|Montenegro|Evro|EUR|€|2|Morocco|درهم مغربي|MAD|د.م.|2|Morocco|dirham marocain|MAD|DH|2|Morocco|Derhem Umeṛṛuki|MAD|MAD|2|Morocco|ⴷⵔⵀⵎ ⴰⵎⵖⵔⴰⴱⵉ|MAD|ⴷⵔ|2|Myanmar|မြန်မာကျပ်|MMK|K|0|Nepal|रुपैयाँ|NPR|रु|2|Netherlands|Euro|EUR|€|2|Netherlands|euro|EUR|€|2|New Zealand|New Zealand Dollar|NZD|$|2|New Zealand|tāra|NZD|$|2|Nicaragua|córdoba nicaragüense|NIO|C$|2|Nigeria|Nigerian Naira|NGN|₦|2|Nigeria|Naira|NGN|₦|2|Nigeria|Naịra|NGN|₦|2|Nigeria|Naira ti Orílẹ́ède Nàìjíríà|NGN|₦|2|Norway|norske kroner|NOK|kr|2|Norway|norsk krone|NOK|kr|2|Norway|norgga kruvdno|NOK|kr|2|Norway|kråvnoe|NOK|kr|2|Norway|kråvnnå|NOK|kr|2|Oman|ريال عماني|OMR|ر.ع.|3|Panama|balboa panameño|PAB|B/.|2|Paraguay|guaraní paraguayo|PYG|₲|0|Paraguay|Guarani|PYG|₲|0|People's Republic of China|མི་དམངས་ཤོག་སྒོཪ།|CNY|¥|2|People's Republic of China|ꎆꃀ|CNY|¥|2|People's Republic of China|ᠠᠷᠠᠳ ᠤᠨ ᠵᠤᠭᠤᠰ|CNY|¥|2|People's Republic of China|خەلق پۇلى|CNY|¥|2|People's Republic of China|人民币|CNY|¥|2|Peru|sol peruano|PEN|S/|2|Philippines|Philippine Peso|PHP|₱|2|Philippines|Piso ng Pilipinas|PHP|₱|2|Poland|złoty polski|PLN|zł|2|Portugal|euro|EUR|€|2|Principality of Monaco|euro|EUR|€|2|Puerto Rico|dólar estadounidense|USD|$|2|Qatar|ريال قطري|QAR|ر.ق.|2|Réunion|euro|EUR|€|2|Romania|leu românesc|RON|RON|2|Russia|һум|RUB|₽|2|Russia|рубль|RUB|₽|2|Russia|солкуобай|RUB|₽|2|Rwanda|Rwandan Franc|RWF|RF|0|Saudi Arabia|ريال سعودي|SAR|ر.س.|2|Senegal|CFA|XOF|CFA|2|Senegal|franc CFA (BCEAO)|XOF|CFA|0|Serbia|динар|RSD|дин.|2|Serbia|Srpski dinar|RSD|RSD|0|Singapore|Singapore Dollar|SGD|$|2|Singapore|新币|SGD|$|2|Slovakia|euro|EUR|€|2|Slovenia|evro|EUR|€|2|Somalia|Shilin soomaali|SOS|S|0|South Africa|Suid-Afrikaanse rand|ZAR|R|2|South Africa|South African Rand|ZAR|R|2|South Africa|i-South African Rand|ZAR|R|2|Spain|euro|EUR|€|2|Spain|Euroa|EUR|€|2|Spain|Euro|EUR|€|2|Sri Lanka|ශ්රී ලංකා රුපියල|LKR|රු.|2|Sri Lanka|இலங்கை ரூபாய்|LKR|Rs.|2|Sweden|ruvdnu|SEK|kr|2|Sweden|kråvnoe|SEK|kr|2|Sweden|kråvnnå|SEK|kr|2|Sweden|Svensk krona|SEK|kr|2|Switzerland|Schweizer Franken|CHF|CHF|2|Switzerland|franc suisse|CHF|CHF|2|Switzerland|franco svizzero|CHF|CHF|2|Switzerland|franc svizzer|CHF|CHF|2|Syria|ليرة سوري|SYP|ل.س.|2|Syria|ܠܝܪܐ ܣܘܪܝܬܐ|SYP|ܠ.ܣ.|2|Taiwan|新台幣|TWD|NT$|2|Tajikistan|Сомонӣ|TJS|смн|2|Thailand|บาท|THB|฿|2|Trinidad and Tobago|Trinidad and Tobago Dollar|TTD|$|2|Tunisia|دينار تونسي|TND|د.ت.|3|Turkey|Türk Lirası|TRY|₺|2|Turkmenistan|manat|TMT|m.|2|U.A.E.|درهم اماراتي|AED|د.إ.|2|Ukraine|гривня|UAH|₴|2|United Kingdom|Punt Prydain|GBP|£|2|United Kingdom|Pound Sterling|GBP|£|2|United Kingdom|Punnd Sasannach|GBP|£|2|United States|US Dollar|USD|$|2|United States|Dólar de EE. UU.|USD|$|2|Uruguay|peso uruguayo|UYU|$|2|Uzbekistan|Ўзбекистон сўм|UZS|сўм|0|Uzbekistan|Oʻzbekiston soʻmi|UZS|soʻm|0|Vietnam|Đồng|VND|₫|2|World|Special Drawing Rights|XDR|XDR|2|Yemen|ريال يمني|YER|ر.ي.|2|Zimbabwe|US Dollar|USD|US$|2"; string[] currencyList = allCurrencies.Split('|'); List currencyBaseList = new List (); for (int i = 1; i <= currencyList.Length; i++) { if (i % 5 == 0) { currencyBase item = new currencyBase(); item.Name = currencyList[i - 4]; item.Code = currencyList[i - 3]; item.Symbol = currencyList[i - 2]; item.Precision = Convert.ToInt32(currencyList[i - 1]); currencyBaseList.Add(item); } } return currencyBaseList; }
public class currencyBase { public string Name { get; set; } public string Code { get; set; } public string Symbol { get; set; } public int Precision { get; set; } }
没错,就是上面的 allCurrencies..
如果你是一个懒人,就直接Copy吧..