Exemple #1
0
        /// <summary>
        /// 新增适用飞机
        /// </summary>
        /// <returns></returns>
        public ApplicableAircraft AddNewApplicableAircraft()
        {
            var applicableAircraft = new ApplicableAircraft
            {
                ScnId = Id,
            };

            applicableAircraft.GenerateNewIdentity();
            ApplicableAircrafts.Add(applicableAircraft);

            return applicableAircraft;
        }
Exemple #2
0
 /// <summary>
 ///     设置适用飞机属性
 /// </summary>
 /// <param name="applicableAircraft">适用飞机</param>
 /// <param name="completeDate">完成日期</param>
 /// <param name="cost">费用</param>
 /// <param name="contractAircraftId">合同飞机外键</param>
 public static void SetApplicableAircraft(ApplicableAircraft applicableAircraft, DateTime completeDate, decimal cost, int contractAircraftId)
 {
     applicableAircraft.SetCompleteDate(completeDate);
     applicableAircraft.SetCost(cost);
     applicableAircraft.SetContractAircraft(contractAircraftId);
 }
Exemple #3
0
 /// <summary>
 ///     更新适用飞机
 /// </summary>
 /// <param name="applicableAircraftDto">适用飞机DTO</param>
 /// <param name="applicableAircraft">适用飞机</param>
 private void UpdateApplicableAircraft(ApplicableAircraftDTO applicableAircraftDto,
     ApplicableAircraft applicableAircraft)
 {
     ScnFactory.SetApplicableAircraft(applicableAircraft, applicableAircraftDto.CompleteDate,
         applicableAircraftDto.Cost, applicableAircraftDto.ContractAircraftId);
 }
Exemple #4
0
 /// <summary>
 ///     创建适用飞机
 /// </summary>
 /// <returns></returns>
 public static ApplicableAircraft CreateApplicableAircraft()
 {
     var applicableAircraft = new ApplicableAircraft();
     applicableAircraft.GenerateNewIdentity();
     return applicableAircraft;
 }