示例#1
0
        public static Operation OutDTOToOperation(OutOperationDTO operationDTO)
        {
            var operation = new Operation
            {
                Id            = operationDTO.Id,
                OperationName = (operationDTO.Name),
                Description   = (operationDTO.Description),
                TimeTakes     = (operationDTO.TimeTakes),
                StartupTime   = operationDTO.StartupTime
            };

            return(operation);
        }
示例#2
0
        public static OutOperationDTO OperationToOutDTO(Operation operation)
        {
            var operationDTO = new OutOperationDTO
            {
                Id          = operation.Id,
                Name        = operation.OperationName,
                Description = operation.Description,
                TimeTakes   = operation.TimeTakes,
                Tool        = operation.Tool.Name,
                StartupTime = operation.StartupTime
            };

            return(operationDTO);
        }