예제 #1
0
파일: Scn.cs 프로젝트: unicloud/FRP
        /// <summary>
        /// 新增适用飞机
        /// </summary>
        /// <returns></returns>
        public ApplicableAircraft AddNewApplicableAircraft()
        {
            var applicableAircraft = new ApplicableAircraft
            {
                ScnId = Id,
            };

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

            return applicableAircraft;
        }
예제 #2
0
파일: ScnFactory.cs 프로젝트: unicloud/FRP
 /// <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);
 }
예제 #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);
 }
예제 #4
0
파일: ScnFactory.cs 프로젝트: unicloud/FRP
 /// <summary>
 ///     创建适用飞机
 /// </summary>
 /// <returns></returns>
 public static ApplicableAircraft CreateApplicableAircraft()
 {
     var applicableAircraft = new ApplicableAircraft();
     applicableAircraft.GenerateNewIdentity();
     return applicableAircraft;
 }