Exemple #1
0
 /// <summary>
 ///     新建机型
 /// </summary>
 /// <param name="name">机型名称</param>
 /// <returns>机型</returns>
 public static AircraftType CreateAircraftType(string name)
 {
     var aircraftType = new AircraftType
     {
         Name = name
     };
     aircraftType.ChangeCurrentIdentity(Guid.NewGuid());
     return aircraftType;
 }
Exemple #2
0
 /// <summary>
 ///     设置机型属性
 /// </summary>
 /// <param name="aircraftType">当前机型</param>
 /// <param name="name">机型名称</param>
 /// <param name="description">描述</param>
 /// <param name="aircraftSeriesId">飞机系列</param>
 /// <param name="manufacturerId">制造商</param>
 /// <param name="aircraftCategoryId">座级</param>
 /// <param name="caacAircraftTypeId">民航机型</param>
 public static void SetAircraftType(AircraftType aircraftType, string name, string description,
     Guid aircraftCategoryId, Guid aircraftSeriesId, Guid manufacturerId, Guid caacAircraftTypeId)
 {
     aircraftType.Name = name;
     aircraftType.Description = description;
     aircraftType.AircraftCategoryId = aircraftCategoryId;
     aircraftType.AircraftSeriesId = aircraftSeriesId;
     aircraftType.ManufacturerId = manufacturerId;
     aircraftType.CaacAircraftTypeId = caacAircraftTypeId;
 }
Exemple #3
0
 /// <summary>
 ///     新建机型
 /// </summary>
 /// <returns></returns>
 public static AircraftType CreateAircraftType()
 {
     var aircraftType = new AircraftType();
     aircraftType.ChangeCurrentIdentity(Guid.NewGuid());
     return aircraftType;
 }
Exemple #4
0
        /// <summary>
        ///     设置机型
        /// </summary>
        /// <param name="aircraftType">机型</param>
        public void SetAircraftType(AircraftType aircraftType)
        {
            if (aircraftType == null || aircraftType.IsTransient())
            {
                throw new ArgumentException("机型参数为空!");
            }

            AircraftType = aircraftType;
            AircraftTypeId = aircraftType.Id;
        }