Beispiel #1
0
        public static internalDTO.Payment MapFromDAL(externalDTO.Payment payment)
        {
            var res = payment == null ? null : new internalDTO.Payment
            {
                Id              = payment.Id,
                BillId          = payment.BillId,
                Bill            = DAL.App.EF.Mappers.BillMapper.MapFromDAL(payment.Bill),
                PaymentMethodId = payment.PaymentMethodId,
                PaymentMethod   = PaymentMethodMapper.MapFromDAL(payment.PaymentMethod),
                Sum             = payment.Sum,
                PaymentTime     = payment.PaymentTime
            };

            return(res);
        }
Beispiel #2
0
        public static BLL.App.DTO.Payment MapFromDAL(DAL.App.DTO.Payment payment)
        {
            var res = payment == null ? null : new BLL.App.DTO.Payment
            {
                Id             = payment.Id,
                MeansOfPayment = payment.MeansOfPayment,
                PaymentCode    = payment.PaymentCode,
                TimeOfPayment  = payment.TimeOfPayment,
                Total          = payment.Total,
                Comment        = payment.Comment,
                InvoiceId      = payment.InvoiceId,
                Invoice        = InvoiceMapper.MapFromDAL(payment.Invoice)
            };

            return(res);
        }