Exemplo n.º 1
0
 /// <summary>
 ///     设置运营权历史
 /// </summary>
 /// <param name="operationHistory">运营权历史</param>
 public void SetOperationHistory(OperationHistory operationHistory)
 {
     OperationHistory = operationHistory;
     if (operationHistory!=null)
     {
         OperationHistoryId = operationHistory.Id;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 新增飞运营权历史
        /// </summary>
        /// <returns></returns>
        public OperationHistory AddNewOperationHistory()
        {
            var operationHistory = new OperationHistory
            {
                AircraftId = Id,
            };

            operationHistory.GenerateNewIdentity();
            OperationHistories.Add(operationHistory);

            return operationHistory;
        }
Exemplo n.º 3
0
        /// <summary>
        ///     更新运营权历史
        /// </summary>
        /// <param name="operationHistoryDto">运营权历史DTO</param>
        /// <param name="operationHistory">运营权历史</param>
        private void UpdateOperationHistory(OperationHistoryDTO operationHistoryDto, OperationHistory operationHistory)
        {
            //获取相关数据
            Airlines airlines = _airlinesRepository.Get(operationHistoryDto.AirlinesId);
            ActionCategory exportCategory = _actionCategoryRepository.Get(operationHistoryDto.ExportCategoryId);
            ActionCategory importCategory = _actionCategoryRepository.Get(operationHistoryDto.ImportCategoryId);

            //更新运营权历史
            operationHistory.SetAirlines(airlines);
            operationHistory.SetEndDate(operationHistoryDto.EndDate);
            operationHistory.SetExportCategoryID(exportCategory);
            operationHistory.SetImportCategory(importCategory);
            operationHistory.SetNote(operationHistoryDto.Note);
            operationHistory.SetOnHireDate(operationHistoryDto.OnHireDate);
            operationHistory.SetOperationStatus((OperationStatus) operationHistoryDto.Status);
            operationHistory.SetReceiptDate(operationHistoryDto.ReceiptDate);
            operationHistory.SetRegNumber(operationHistoryDto.RegNumber);
            operationHistory.SetStartDate(operationHistoryDto.StartDate);
            operationHistory.SetStopDate(operationHistoryDto.StopDate);
            operationHistory.SetTechDeliveryDate(operationHistoryDto.TechDeliveryDate);
            operationHistory.SetTechReceiptDate(operationHistoryDto.TechReceiptDate);
        }