Exemplo n.º 1
0
        public virtual Pricelist ToPricelist(pricingDto.Pricelist pricelistDto, IEnumerable <Currency> availCurrencies, Language language)
        {
            var currency = availCurrencies.FirstOrDefault(x => x.Equals(pricelistDto.Currency)) ?? new Currency(language, pricelistDto.Currency);
            var result   = ServiceLocator.Current.GetInstance <PricingFactory>().CreatePricelist(currency);

            result.Id = pricelistDto.Id;
            return(result);
        }
Exemplo n.º 2
0
        public virtual Pricelist ToPricelist(pricingDto.Pricelist pricelistDto, IEnumerable <Currency> availCurrencies, Language language)
        {
            var currency = availCurrencies.FirstOrDefault(x => x.Equals(pricelistDto.Currency)) ?? new Currency(language, pricelistDto.Currency);
            var result   = new Pricelist(currency);

            result.Id = pricelistDto.Id;
            return(result);
        }
Exemplo n.º 3
0
 public static Pricelist ToPricelist(this pricingDto.Pricelist pricelistDto, IEnumerable <Currency> availCurrencies, Language language)
 {
     return(PricingConverterInstance.ToPricelist(pricelistDto, availCurrencies, language));
 }