Esempio n. 1
0
 protected bool Equals(Payment other)
 {
     return ID == other.ID &&
         string.Equals(Number, other.Number) &&
         SaleDate.Equals(other.SaleDate) &&
         (PaymentDetails.SequenceEqual(other.PaymentDetails, new PaymentDetailComparer()));
 }
Esempio n. 2
0
        protected void WriteToPaymentModel(Payment newModel)
        {
            newModel.ID = PaymentId;
            newModel.SaleDate = SaleDate;
            newModel.Number = Number;

            newModel.PaymentDetails.Clear();

            foreach (var paymentDetail in PaymentDetailList)
            {
                newModel.PaymentDetails.Add(paymentDetail);
            }

            newModel.TotalValue = TotalValue;
        }
Esempio n. 3
0
        protected virtual void ReadFromModel(Payment payment)
        {
            PaymentId = payment.ID;

            Number = payment.Number;
            SaleDate = payment.SaleDate;

            PaymentDetailList.Clear();
            foreach (var paymentDetail in payment.PaymentDetails)
            {
                PaymentDetailList.Add(paymentDetail);
            }
        }
Esempio n. 4
0
        protected override void ReadFromModel(Payment payment)
        {
            base.ReadFromModel(payment);
            InvoiceModel = payment as Invoice;

            IssueDate = InvoiceModel.IssueDate;
            SelectedPaymentMethod = InvoiceModel.PaymentMethod;
            PaymentPeriod = InvoiceModel.PaymentPeriod;
            Annotation = InvoiceModel.Annotation;
        }