示例#1
0
 /// <summary>
 /// 创建装机控制
 /// </summary>
 /// <param name="startDate">启用日期</param>
 /// <param name="endDate">失效日期</param>
 /// <param name="item">附件项</param>
 /// <param name="pnReg">可互换附件</param>
 /// <param name="aircraftType">机型</param>
 /// <returns></returns>
 public static InstallController CreateInstallController(DateTime startDate, DateTime? endDate, Item item, PnReg pnReg, AircraftType aircraftType)
 {
     var installController = new InstallController();
     installController.GenerateNewIdentity();
     installController.SetAircraftType(aircraftType);
     installController.SetItem(item);
     installController.SetPnReg(pnReg);
     installController.SetStartDate(startDate);
     installController.SetEndDate(endDate);
     return installController;
 }
        /// <summary>
        ///     插入依赖项
        /// </summary>
        /// <param name="installController">附件</param>
        /// <param name="dependencyDto">依赖项DTO</param>
        private void InsertDependency(InstallController installController, DependencyDTO dependencyDto)
        {
            //获取
            PnReg pnReg = _pnRegRepository.Get(dependencyDto.DependencyPnId);

            // 添加依赖项
            installController.AddNewDependency(pnReg);
        }
示例#3
0
 /// <summary>
 ///     创建装机控制。
 /// </summary>
 /// <returns>InstallController</returns>
 public static InstallController CreateInstallController()
 {
     var installController = new InstallController();
     installController.GenerateNewIdentity();
     return installController;
 }