Beispiel #1
0
 private void Display_PricingTab(EntryData versionData)
 {
     Currency m_refCurrency = new Currency(m_refContentApi.RequestInformationRef);
         Ektron.Cms.Workarea.workareabase workarearef = new Ektron.Cms.Workarea.workareabase();
         List<CurrencyData> activeCurrencyList = m_refCurrency.GetActiveCurrencyList();
         List<ExchangeRateData> exchangeRateList = new List<ExchangeRateData>();
         if (activeCurrencyList.Count > 1)
         {
             ExchangeRateApi exchangeRateApi = new ExchangeRateApi();
             Criteria<ExchangeRateProperty> exchangeRateCriteria = new Criteria<ExchangeRateProperty>();
             List<long> currencyIDList = new List<long>();
             for (int i = 0; i <= (activeCurrencyList.Count - 1); i++)
             {
                 currencyIDList.Add(activeCurrencyList[i].Id);
             }
             exchangeRateCriteria.AddFilter(ExchangeRateProperty.BaseCurrencyId, CriteriaFilterOperator.EqualTo, m_refContentApi.RequestInformationRef.CommerceSettings.DefaultCurrencyId);
             exchangeRateCriteria.AddFilter(ExchangeRateProperty.ExchangeCurrencyId, CriteriaFilterOperator.In, currencyIDList.ToArray());
             exchangeRateList = exchangeRateApi.GetCurrentList(exchangeRateCriteria);
         }
         ltr_pricing.Text = workarearef.CommerceLibrary.GetPricingMarkup(versionData.Pricing, activeCurrencyList, exchangeRateList, entry_data.EntryType, false, workareaCommerce.ModeType.View);
 }