Esempio n. 1
0
        /// <summary>
        ///     设置飞机配置
        /// </summary>
        /// <param name="acConfiguration">配置</param>
        public void SetAircraftConfiguration(AircraftConfiguration acConfiguration)
        {
            if (acConfiguration == null || acConfiguration.IsTransient())
            {
                throw new ArgumentException("配置参数为空!");
            }

            AircraftConfigurationId = acConfiguration.Id;
        }
 /// <summary>
 /// 设置飞机配置属性
 /// </summary>
 /// <param name="aircraftConfiguration">飞机配置</param>
 /// <param name="configCode">配置代码</param>
 /// <param name="aircraftSeriesId">系列</param>
 /// <param name="aircraftTypeId">机型</param>
 /// <param name="bew">基本空重</param>
 /// <param name="bw">基本重量</param>
 /// <param name="bwf">基本重量重心</param>
 /// <param name="bwi">基本重量指数</param>
 /// <param name="description">描述</param>
 /// <param name="mcc">最大商载</param>
 /// <param name="mlw">最大着陆重量</param>
 /// <param name="mmfw">最大可用燃油</param>
 /// <param name="mtow">最大起飞重量</param>
 /// <param name="mtw">最大滑行重量</param>
 /// <param name="mzfw">最大零燃油重量</param>
 /// <param name="fileName">座位布局图名字</param>
 /// <param name="fileContent">座位布局图</param>
 public static void SetAircraftConfiguration(AircraftConfiguration aircraftConfiguration, string configCode, Guid aircraftSeriesId, Guid aircraftTypeId,
     decimal bew, decimal bw, decimal bwf, decimal bwi, string description, decimal mcc, decimal mlw, decimal mmfw, decimal mtow, decimal mtw, decimal mzfw,
     string fileName, byte[] fileContent)
 {
     aircraftConfiguration.ConfigCode = configCode;
     aircraftConfiguration.AircraftSeriesId = aircraftSeriesId;
     aircraftConfiguration.AircraftTypeId = aircraftTypeId;
     aircraftConfiguration.BEW = bew;
     aircraftConfiguration.BW = bw;
     aircraftConfiguration.BWF = bwf;
     aircraftConfiguration.BWI = bwi;
     aircraftConfiguration.Description = description;
     aircraftConfiguration.MCC = mcc;
     aircraftConfiguration.MLW = mlw;
     aircraftConfiguration.MMFW = mmfw;
     aircraftConfiguration.MTOW = mtow;
     aircraftConfiguration.MTW = mtw;
     aircraftConfiguration.MZFW = mzfw;
     aircraftConfiguration.FileName = fileName;
     aircraftConfiguration.FileContent = fileContent;
 }
 /// <summary>
 /// 新建飞机配置
 /// </summary>
 /// <returns></returns>
 public static AircraftConfiguration CreateAircraftConfiguration()
 {
     var aircraftConfiguration = new AircraftConfiguration();
     aircraftConfiguration.GenerateNewIdentity();
     return aircraftConfiguration;
 }
Esempio n. 4
0
        /// <summary>
        /// 新增飞机配置历史
        /// </summary>
        /// <returns></returns>
        public AcConfigHistory AddNewAcConfigHistory(AircraftConfiguration aircraftConfiguration, DateTime starDate, DateTime? endatDate)
        {
            var acConfigHistory = new AcConfigHistory
            {
                AircraftId = Id,
            };
            acConfigHistory.SetAircraftConfiguration(aircraftConfiguration);
            acConfigHistory.SetStartDate(starDate);
            acConfigHistory.SetEndDate(endatDate);
            acConfigHistory.GenerateNewIdentity();

            AcConfigHistories.Add(acConfigHistory);
            return acConfigHistory;
        }