Ejemplo n.º 1
0
        internal Equipment ConvertEquipment(EquipmentDto equipmentDto)
        {
            var equipment = new Equipment()
            {
                Description       = equipmentDto.Description,
                Name              = equipmentDto.Name,
                Type              = equipmentDto.Type,
                ConveyorId        = equipmentDto.Conveyor != null ? equipmentDto.Conveyor.Id : null,
                WorkshopId        = equipmentDto.Workshop != null ? equipmentDto.Workshop.Id : null,
                Cost              = equipmentDto.Cost,
                LoadFactor        = equipmentDto.LoadFactor,
                MaintenanceCost   = equipmentDto.MaintenanceCost,
                UsingTimeResource = equipmentDto.UsingTimeResource
            };

            return(equipment);
        }
Ejemplo n.º 2
0
        internal EquipmentDto ConvertEquipment(Equipment equipment)
        {
            var equipmentDto = new EquipmentDto()
            {
                Description                                                                                                    = equipment.Description,
                Id                                                                                                             = equipment.Id,
                Name                                                                                                           = equipment.Name,
                Type                                                                                                           = equipment.Type,
                Conveyor                                                                                                       = equipment.Conveyor != null?ConvertConveyor(equipment.Conveyor) : null,
                                                                      Workshop                                                 = equipment.Workshop != null?ConvertWorkshop(equipment.Workshop) : null,
                                                                                                             Cost              = equipment.Cost,
                                                                                                             LoadFactor        = equipment.LoadFactor,
                                                                                                             MaintenanceCost   = equipment.MaintenanceCost,
                                                                                                             UsingTimeResource = equipment.UsingTimeResource
            };

            return(equipmentDto);
        }