Exemplo n.º 1
0
        /// <summary>
        ///     更新商业数据历史
        /// </summary>
        /// <param name="engineBhDto">商业数据历史DTO</param>
        /// <param name="engineBh">商业数据历史</param>
        private void UpdateEngineBusinessHistory(EngineBusinessHistoryDTO engineBhDto, EngineBusinessHistory engineBh)
        {
            //获取相关数据
            EngineType engineType = _engineTypeRepository.Get(engineBhDto.EngineTypeId);
            ActionCategory importCategory = _actionCategoryRepository.Get(engineBhDto.ImportCategoryId);

            //更新商业数据历史
            engineBh.SetEngineType(engineType);
            engineBh.SetEndDate(engineBhDto.EndDate);
            engineBh.SetImportCategory(importCategory);
            engineBh.SetStartDate(engineBhDto.StartDate);
            engineBh.SetMaxThrust(engineBhDto.MaxThrust);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     插入商业数据历史
        /// </summary>
        /// <param name="engine">实际发动机</param>
        /// <param name="engineBhDto">商业数据历史DTO</param>
        private void InsertEngineBusinesHistory(Engine engine, EngineBusinessHistoryDTO engineBhDto)
        {
            //获取相关数据
            EngineType engineType = _engineTypeRepository.Get(engineBhDto.EngineTypeId);
            ActionCategory importCategory = _actionCategoryRepository.Get(engineBhDto.ImportCategoryId);

            //添加商业数据历史
            EngineBusinessHistory newEngineBh = engine.AddNewEngineBusinessHistory();
            newEngineBh.SetEngineType(engineType);
            newEngineBh.SetEndDate(engineBhDto.EndDate);
            newEngineBh.SetImportCategory(importCategory);
            newEngineBh.SetStartDate(engineBhDto.StartDate);
            newEngineBh.SetMaxThrust(engineBhDto.MaxThrust);
        }