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

            return(res);
        }
Exemple #2
0
        public static internalDTO.Bill MapFromDAL(externalDTO.Bill bill)
        {
            var res = bill == null ? null : new internalDTO.Bill
            {
                Id              = bill.Id,
                ClientId        = bill.ClientId,
                Client          = ClientMapper.MapFromDAL(bill.Client),
                WorkObjectId    = bill.WorkObjectId,
                WorkObject      = WorkObjectMapper.MapFromDAL(bill.WorkObject),
                ArrivalFee      = bill.ArrivalFee,
                SumWithOutTaxes = bill.SumWithoutTaxes,
                TaxPercent      = bill.TaxPercent,
                FinalSum        = bill.FinalSum,
                DateTime        = bill.DateTime,
                InvoiceNr       = bill.InvoiceNr,
                Comment         = new internalDTO.MultiLangString(bill.Comment),
//                BillLines = bill.BillLines.Select(e => BillLineMapper.MapFromDAL(e)).ToList(),
//                Payments = bill.Payments.Select(e => PaymentMapper.MapFromDAL(e)).ToList(),
            };

            return(res);
        }