/// <summary>
 ///     创建基本构型历史
 /// </summary>
 /// <param name="contractAircraft">合同飞机</param>
 /// <param name="basicConfigGroup">基本构型组</param>
 /// <param name="startDate">开始日期</param>
 /// <param name="endDate">结束日期</param>
 /// <returns></returns>
 public static BasicConfigHistory CreateBasicConfigHistory(ContractAircraft contractAircraft,
     BasicConfigGroup basicConfigGroup, DateTime startDate, DateTime? endDate)
 {
     var basicConfigHistory = new BasicConfigHistory();
     basicConfigHistory.GenerateNewIdentity();
     basicConfigHistory.SetContractAircraft(contractAircraft);
     basicConfigHistory.SetBasicConfigGroup(basicConfigGroup);
     basicConfigHistory.SetStartDate(startDate);
     basicConfigHistory.SetEndDate(endDate);
     return basicConfigHistory;
 }
Beispiel #2
0
 /// <summary>
 ///     创建特定选型
 /// </summary>
 /// <param name="position">位置信息</param>
 /// <param name="description">描述</param>
 /// <param name="item">附件项</param>
 /// <param name="parentAcConfig">父项构型</param>
 /// <param name="startDate">开始时间</param>
 /// <param name="endDate">结束时间</param>
 /// <param name="contractAircraft">合同飞机</param>
 /// <returns></returns>
 public static SpecialConfig CreateSpecialConfig(int position, string description, Item item,
     AcConfig parentAcConfig, DateTime startDate, DateTime? endDate, ContractAircraft contractAircraft)
 {
     var specialConfig = new SpecialConfig();
     specialConfig.GenerateNewIdentity();
     specialConfig.CreateDate = DateTime.Now;
     specialConfig.SetPosition((Position)position);
     specialConfig.SetDescription(description);
     specialConfig.SetItem(item);
     specialConfig.SetParentItem(parentAcConfig);
     specialConfig.SetContractAircraf(contractAircraft);
     specialConfig.SetStartDate(startDate);
     specialConfig.SetEndDate(endDate);
     return specialConfig;
 }
Beispiel #3
0
        /// <summary>
        ///     设置合同飞机
        /// </summary>
        /// <param name="contractAircraft">合同飞机</param>
        public void SetContractAircraft(ContractAircraft contractAircraft)
        {
            if (contractAircraft == null || contractAircraft.IsTransient())
            {
                throw new ArgumentException("合同飞机参数为空!");
            }

            ContractAircraftId = contractAircraft.Id;
        }