Beispiel #1
0
        public static internalDTO.BillLine MapFromDAL(externalDTO.BillLine billLine)
        {
            var res = billLine == null ? null : new internalDTO.BillLine
            {
                Id              = billLine.Id,
                BillId          = billLine.BillId,
                Bill            = BillMapper.MapFromDAL(billLine.Bill),
                Product         = new internalDTO.MultiLangString(billLine.Product),
                Amount          = billLine.Amount,
                Sum             = billLine.Sum,
                DiscountPercent = billLine.DiscountPercent,
                SumWithDiscount = billLine.SumWithDiscount
            };

            return(res);
        }
Beispiel #2
0
        public static externalDTO.BillLine MapFromDomain(internalDTO.BillLine billLine)
        {
            var res = billLine == null ? null : new externalDTO.BillLine
            {
                Id              = billLine.Id,
                BillId          = billLine.BillId,
                Bill            = BillMapper.MapFromDomain(billLine.Bill),
                Product         = billLine.Product.Translate(),
                Amount          = billLine.Amount,
                Sum             = billLine.Sum,
                DiscountPercent = billLine.DiscountPercent,
                SumWithDiscount = billLine.SumWithDiscount
            };

            return(res);
        }