コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: BillMapper.cs プロジェクト: iiristakel/garage
        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);
        }