Example #1
0
 /// <summary>
 /// Create a new (empty) Order based on an existing Order
 /// </summary>
 /// <param name="order">The original Order</param>
 /// <returns>new Order</returns>
 private static Model.Order.Order CloneOrder(Model.Order.Order order)
 {
     var neworder = order.Clone();
     neworder.Id = null;
     neworder.AmountPaid = 0;
     neworder.AmountRefunded = 0;
     neworder.OrderReference = null;
     return neworder;
 }
Example #2
0
 /// <summary>
 /// Create a new Booking based on an existing booking
 /// </summary>
 /// <param name="order">The order to attach the new Booking to</param>
 /// <param name="booking">The original Booking</param>
 /// <returns>new Booking</returns>
 private static Model.Booking.Booking CloneBooking(Model.Order.Order order, Model.Booking.Booking booking)
 {
     var newBooking = booking.Clone();
     newBooking.Id = null;
     newBooking.BookingReferenceNumber = null;
     newBooking.OrderId = order.Id.Value;
     newBooking.Order = order;
     return newBooking;
 }