public static internalDTO.ProductForClient MapFromExternal(externalDTO.ProductForClient productForClient)
        {
            var res = productForClient == null ? null : new internalDTO.ProductForClient
            {
                Id        = productForClient.Id,
                Client    = ClientMapper.MapFromExternal(productForClient.Client),
                ClientId  = productForClient.ClientId,
                Product   = ProductMapper.MapFromExternal(productForClient.Product),
                ProductId = productForClient.ProductId,
                Count     = productForClient.Count,
//                    ProductServices = productForClient.ProductServices.Select(e => ProductServiceMapper.MapFromExternal(e)).ToList(),
            };

            return(res);
        }
Beispiel #2
0
        public static internalDTO.WorkObject MapFromExternal(externalDTO.WorkObject workObject)
        {
            var res = workObject == null ? null : new internalDTO.WorkObject
            {
                Id       = workObject.Id,
                Client   = ClientMapper.MapFromExternal(workObject.Client),
                ClientId = workObject.ClientId,
                From     = workObject.From,
                Until    = workObject.Until,
//                AppUsersOnObject = workObject.AppUsersOnObject.Select(e => AppUserOnObjectMapper.MapFromExternal(e)).ToList(),
//                ProductsServices = workObject.ProductsServices.Select(e => ProductServiceMapper.MapFromExternal(e)).ToList(),
//                Bills = workObject.Bills.Select(e => BillMapper.MapFromExternal(e)).ToList(),
            };

            return(res);
        }
Beispiel #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);
        }