public void UndoDelete(TourPaymentCollection originalList) { foreach (TourPayment payment in this) { originalList.Add(payment); } this.Clear(); }
internal void CopyTo(TourPaymentCollection payments) { payments.Clear(); foreach (TourPayment payment in this) { TourPayment paymentCopy = new TourPayment(); payment.CopyTo(paymentCopy); payments.Add(paymentCopy); } }
public TourServiceBase() { this.id = -1; this.costDetails = new TourCostDetailCollection(); this.payments = new TourPaymentCollection(); this.Bill = new TourReceipt(); this.serviceType = new Service(); this.DeletedPayments = new TourPaymentCollection(); this.CostDetails.ListChanged += new ListChangedEventHandler(CostDetails_ListChanged); this.Payments.ListChanged += new ListChangedEventHandler(Payments_ListChanged); }