private decimal CalculateBuyerDiscount(decimal currentPrice, BuyerType buyerType) { switch (buyerType) { case BuyerType.Retail: currentPrice = Price; break; case BuyerType.Wholesale: currentPrice = Price * .9M; break; case BuyerType.Academic: currentPrice = Price * .8M; break; case BuyerType.Goverment: currentPrice = Price * .85M; break; default: break; } return(currentPrice); }
public double CalPriceForA(double orderPrice, BuyerType buyerType) { if (buyerType == BuyerType.SuperVip) { return(orderPrice * 0.8); } if (buyerType == BuyerType.Vip) { return(orderPrice * 0.85); } return(orderPrice * 0.9); }