public static externalDTO.ProductForClient MapFromInternal(internalDTO.ProductForClient productForClient) { var res = productForClient == null ? null : new externalDTO.ProductForClient { Id = productForClient.Id, Client = ClientMapper.MapFromInternal(productForClient.Client), ClientId = productForClient.ClientId, Product = ProductMapper.MapFromInternal(productForClient.Product), ProductId = productForClient.ProductId, Count = productForClient.Count, // ProductServices = productForClient.ProductServices.Select(e => ProductServiceMapper.MapFromInternal(e)).ToList(), }; return(res); }
public static externalDTO.WorkObject MapFromInternal(internalDTO.WorkObject workObject) { var res = workObject == null ? null : new externalDTO.WorkObject { Id = workObject.Id, Client = ClientMapper.MapFromInternal(workObject.Client), ClientId = workObject.ClientId, From = workObject.From, Until = workObject.Until, // AppUsersOnObject = workObject.AppUsersOnObject.Select(e => AppUserOnObjectMapper.MapFromInternal(e)).ToList(), // ProductsServices = workObject.ProductsServices.Select(e => ProductServiceMapper.MapFromInternal(e)).ToList(), // Bills = workObject.Bills.Select(e => BillMapper.MapFromInternal(e)).ToList(), }; return(res); }
public static externalDTO.Bill MapFromInternal(internalDTO.Bill bill) { var res = bill == null ? null : new externalDTO.Bill { Id = bill.Id, ClientId = bill.ClientId, Client = ClientMapper.MapFromInternal(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.MapFromInternal(bill.WorkObject), // BillLines = bill.BillLines.Select(e => BillLineMapper.MapFromInternal(e)).ToList(), }; return(res); }