Пример #1
0
        public static ICollection <externalDTO.ProcurementObject> MapObjects(internalDTO.Procurement procurement)
        {
            ICollection <externalDTO.ProcurementObject> procurementObjects = new ICollection();

            for (int i = 0; i < procurement.ProcurementObjects.Count; i++)
            {
                procurementObjects.Add(ProcurementObjectMapper.MapFromDAL(procurement.ProcurementObjects[i]));
            }
        }
        public static externalDTO.ProcurementObjectRow MapFromInternal(internalDTO.ProcurementObjectRow procurementObjectRow)
        {
            var res = procurementObjectRow == null
                ? null
                : new externalDTO.ProcurementObjectRow
            {
                Id                  = procurementObjectRow.Id,
                Year                = procurementObjectRow.Year,
                Amount              = procurementObjectRow.Amount,
                Price               = procurementObjectRow.Price,
                ProcurementObject   = ProcurementObjectMapper.MapFromDAL(procurementObjectRow.ProcurementObject),
                ProcurementObjectId = procurementObjectRow.ProcurementObjectId,
                Sum                 = procurementObjectRow.Sum
            };

            return(res);
        }