Example #1
0
        public static DAL.App.DTO.ProductService MapFromBLL(BLL.App.DTO.ProductService productService)
        {
            var res = productService == null ? null : new DAL.App.DTO.ProductService()
            {
                Id                 = productService.Id,
                Description        = productService.Description,
                WorkObjectId       = productService.WorkObjectId,
                WorkObject         = WorkObjectMapper.MapFromBLL(productService.WorkObject),
                ProductForClientId = productService.ProductForClientId,
                ProductForClient   = ProductForClientMapper.MapFromBLL(productService.ProductForClient)
            };

            return(res);
        }
        public static DAL.App.DTO.AppUserOnObject MapFromBLL(BLL.App.DTO.AppUserOnObject appUserOnObject)
        {
            var res = appUserOnObject == null ? null : new DAL.App.DTO.AppUserOnObject
            {
                Id           = appUserOnObject.Id,
                AppUserId    = appUserOnObject.AppUserId,
                AppUser      = AppUserMapper.MapFromBLL(appUserOnObject.AppUser),
                WorkObjectId = appUserOnObject.WorkObjectId,
                WorkObject   = WorkObjectMapper.MapFromBLL(appUserOnObject.WorkObject),
                From         = appUserOnObject.From,
                Until        = appUserOnObject.Until
            };

            return(res);
        }
Example #3
0
        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);
        }