コード例 #1
0
ファイル: PaymentMapper.cs プロジェクト: iiristakel/garage
        public static internalDTO.Payment MapFromExternal(externalDTO.Payment payment)
        {
            var res = payment == null ? null : new internalDTO.Payment
            {
                Id              = payment.Id,
                BillId          = payment.BillId,
                Bill            = BillMapper.MapFromExternal(payment.Bill),
                PaymentMethodId = payment.PaymentMethodId,
                PaymentMethod   = PaymentMethodMapper.MapFromExternal(payment.PaymentMethod),
                Sum             = payment.Sum,
                PaymentTime     = payment.PaymentTime
            };

            return(res);
        }
コード例 #2
0
ファイル: BillLineMapper.cs プロジェクト: iiristakel/garage
        public static internalDTO.BillLine MapFromExternal(externalDTO.BillLine billLine)
        {
            var res = billLine == null ? null : new internalDTO.BillLine
            {
                Id              = billLine.Id,
                BillId          = billLine.BillId,
                Bill            = BillMapper.MapFromExternal(billLine.Bill),
                Product         = billLine.Product,
                Amount          = billLine.Amount,
                Sum             = billLine.Sum,
                DiscountPercent = billLine.DiscountPercent,
                SumWithDiscount = billLine.SumWithDiscount
            };

            return(res);
        }