Пример #1
0
 public ActionResult AdjustPrice(string id, AdjustPrice adjustPrice)
 {
     Rental.Rental rental = GetRental(id);
     rental.AdjustPrice(adjustPrice);
     Context.Rentals.Save(rental);
     return RedirectToAction("Index");
 }
Пример #2
0
 public PriceAdjustment(AdjustPrice adjustPrice, decimal oldPrice)
 {
     NewPrice = adjustPrice.NewPrice;
     OldPrice = oldPrice;
     Reason = adjustPrice.Reason;
 }
Пример #3
0
 public void AdjustPrice(AdjustPrice adjustPrice)
 {
     var priceAdjustment = new PriceAdjustment(adjustPrice,Price);
     Adjustments.Add(priceAdjustment);
     Price = adjustPrice.NewPrice;
 }