Exemplo n.º 1
0
        public static externalDTO.ProductService MapFromDomain(internalDTO.ProductService productService)
        {
            var res = productService == null ? null : new externalDTO.ProductService()
            {
                Id                 = productService.Id,
                Description        = productService.Description.Translate(),
                WorkObjectId       = productService.WorkObjectId,
                WorkObject         = WorkObjectMapper.MapFromDomain(productService.WorkObject),
                ProductForClientId = productService.ProductForClientId,
                ProductForClient   = ProductForClientMapper.MapFromDomain(productService.ProductForClient)
            };

            return(res);
        }
Exemplo n.º 2
0
        public static externalDTO.AppUserOnObject MapFromDomain(internalDTO.AppUserOnObject appUserOnObject)
        {
            var res = appUserOnObject == null ? null : new externalDTO.AppUserOnObject
            {
                Id           = appUserOnObject.Id,
                AppUserId    = appUserOnObject.AppUserId,
                AppUser      = DAL.App.EF.Mappers.AppUserMapper.MapFromDomain(appUserOnObject.AppUser),
                WorkObjectId = appUserOnObject.WorkObjectId,
                WorkObject   = WorkObjectMapper.MapFromDomain(appUserOnObject.WorkObject),
                From         = appUserOnObject.From,
                Until        = appUserOnObject.Until
            };

            return(res);
        }
Exemplo n.º 3
0
        public static externalDTO.Bill MapFromDomain(internalDTO.Bill bill)
        {
            var res = bill == null ? null : new externalDTO.Bill
            {
                Id              = bill.Id,
                ClientId        = bill.ClientId,
                Client          = ClientMapper.MapFromDomain(bill.Client),
                ArrivalFee      = bill.ArrivalFee,
                SumWithoutTaxes = bill.SumWithOutTaxes,
                TaxPercent      = bill.TaxPercent,
                FinalSum        = bill.FinalSum,
                DateTime        = bill.DateTime,
                InvoiceNr       = bill.InvoiceNr,
                Comment         = bill.Comment.Translate(),
                WorkObjectId    = bill.WorkObjectId,
                WorkObject      = WorkObjectMapper.MapFromDomain(bill.WorkObject),
//                BillLines = bill.BillLines.Select(e => BillLineMapper.MapFromDomain(e)).ToList(),
//                Payments = bill.Payments.Select(e => PaymentMapper.MapFromDomain(e)).ToList(),
            };

            return(res);
        }