コード例 #1
0
ファイル: InventoryItem.cs プロジェクト: dennex/Comp2614
        public decimal SellVersion2(string buyer, ApplyDiscount discountMode)
        {
            decimal sellPrice;

            this.buyer = buyer;

            if (discountMode == ApplyDiscount.Yes)
            {
                sellPrice = price - (price * DEFAULT_DISCOUNT);
            }
            else
            {
                sellPrice = price;
            }

            return sellPrice;
        }
コード例 #2
0
 ApplyDiscount(ApplyDiscount(price, discount.type), discount.years);