public static internalDTO.ProductService MapFromExternal(externalDTO.ProductService productService)
        {
            var res = productService == null ? null : new internalDTO.ProductService()
            {
                Id                 = productService.Id,
                Description        = productService.Description,
                WorkObjectId       = productService.WorkObjectId,
                WorkObject         = WorkObjectMapper.MapFromExternal(productService.WorkObject),
                ProductForClientId = productService.ProductForClientId,
                ProductForClient   = ProductForClientMapper.MapFromExternal(productService.ProductForClient)
            };

            return(res);
        }
        public static internalDTO.AppUserOnObject MapFromExternal(externalDTO.AppUserOnObject appUserOnObject)
        {
            var res = appUserOnObject == null ? null : new internalDTO.AppUserOnObject
            {
                Id           = appUserOnObject.Id,
                AppUserId    = appUserOnObject.AppUserId,
                AppUser      = AppUserMapper.MapFromExternal(appUserOnObject.AppUser),
                WorkObjectId = appUserOnObject.WorkObjectId,
                WorkObject   = WorkObjectMapper.MapFromExternal(appUserOnObject.WorkObject),
                From         = appUserOnObject.From,
                Until        = appUserOnObject.Until
            };

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

            return(res);
        }