예제 #1
0
 public ActionResult AdjustPrice(string id, AdjustPrice adjustPrice)
 {
     var rental = GetRental(id);
     rental.AdjustPrice(adjustPrice);
     context.Rentals.Save(rental);
     return RedirectToAction("Index");
 }
예제 #2
0
 public PriceAdjustment(AdjustPrice adjustPrice, decimal oldPrice)
 {
     OldPrice = oldPrice;
     NewPrice = adjustPrice.NewPrice;
     Reason = adjustPrice.Reason;
 }
예제 #3
0
 public void AdjustPrice(AdjustPrice adjustPrice)
 {
     var adjustment = new PriceAdjustment(adjustPrice, Price);
     Adjustments.Add(adjustment);
     Price = adjustPrice.NewPrice;
 }