Exemplo n.º 1
0
        /// <summary>
        ///     更新所有权历史
        /// </summary>
        /// <param name="engineOhDto">所有权历史DTO</param>
        /// <param name="engineOh">所有权历史</param>
        private void UpdateEngineOwnershipHistory(EngineOwnershipHistoryDTO engineOhDto, EngineOwnershipHistory engineOh)
        {
            //获取相关数据
            Supplier supplier = _supplierRepository.Get(engineOhDto.SupplierId);

            //更新所有权历史
            engineOh.SetEndDate(engineOhDto.EndDate);
            engineOh.SetStartDate(engineOhDto.StartDate);
            engineOh.SetSupplier(supplier);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     插入所有权历史
        /// </summary>
        /// <param name="engine">实际发动机</param>
        /// <param name="engineOhDto">所有权历史DTO</param>
        private void InsertEngineOwnershipHistory(Engine engine, EngineOwnershipHistoryDTO engineOhDto)
        {
            //获取相关数据
            Supplier supplier = _supplierRepository.Get(engineOhDto.SupplierId);

            //添加所有权历史
            EngineOwnershipHistory newEngineOh = engine.AddNewEngineOwnershipHistory();
            newEngineOh.SetEndDate(engineOhDto.EndDate);
            newEngineOh.SetStartDate(engineOhDto.StartDate);
            newEngineOh.SetSupplier(supplier);
        }