/// <summary> /// 设置机型 /// </summary> /// <param name="aircraftType">机型</param> public void SetAircraftType(AircraftType aircraftType) { if (aircraftType == null || aircraftType.IsTransient()) { throw new ArgumentException("机型参数为空!"); } AircraftType = aircraftType; AircraftTypeId = aircraftType.Id; }
/// <summary> /// 创建基本构型组 /// </summary> /// <param name="aircraftType">机型</param> /// <param name="description">描述</param> /// <param name="groupNo">基本构型组号</param> /// <returns></returns> public static BasicConfigGroup CreateBasicConfigGroup(AircraftType aircraftType, string description, string groupNo) { var basicConfigGroup = new BasicConfigGroup(); basicConfigGroup.GenerateNewIdentity(); basicConfigGroup.SetAircraftType(aircraftType); basicConfigGroup.SetDescription(description); basicConfigGroup.SetGroupNo(groupNo); return basicConfigGroup; }
/// <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; }