예제 #1
0
        public void ByCurrencyRatePay(Product product, CurrencyRate currencyRate, IBankService bankService)
        {
            currencyRate.Price = product.Price;
            var result = bankService.ConvertRate(currencyRate);

            Console.WriteLine(result + " " + currencyRate.Unit + " ödeme alındı");
        }
        public void Sell(Product product, IPerson person)
        {
            var price         = person.CampaignHandler.Calculate(product);
            var exchangePrice = _bankService.ConvertRate(new CurrencyRate {
                Currency = 1, Price = price
            });

            Console.WriteLine(person.Name + " İsimli Müşterimiz için indirim Karşılığı:" + price.ToString("#.##"));
            Console.WriteLine("Ürünün Döviz Karşılığı:" + exchangePrice.ToString("#.##"));
            Console.WriteLine("#####################################################");
        }
예제 #3
0
        public void Sell(Product product, Customer customer)
        {
            double price;

            if (customer.HasBookcard)
            {
                price = product.Price * 0.8;
            }
            bankService.ConvertRate(new CurrencyRate {
                Currency = 1, Price = 100
            });
        }
예제 #4
0
        public void Sell(Product product, ICustomer customer)
        {
            decimal price = product.Price;

            price = customer.GetPrice(price);
            price = bankService.ConvertRate(new CurrencyRate()
            {
                Currency = 1, Price = price
            });
            Console.WriteLine(price);
            Console.ReadLine();
        }