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