/// <summary>
 ///     更新舱位
 /// </summary>
 /// <param name="aircraftCabinDto">舱位DTO</param>
 /// <param name="aircraftCabin">舱位</param>
 private void UpdateAircraftCabin(AircraftCabinDTO aircraftCabinDto, AircraftCabin aircraftCabin)
 {
     // 更新舱位
     AircraftConfigurationFactory.SetAircraftCabin(aircraftCabin, aircraftCabinDto.AircraftCabinTypeId,
         aircraftCabinDto.SeatNumber, aircraftCabinDto.Note);
 }
 /// <summary>
 /// 设置座位布局属性
 /// </summary>
 /// <param name="aircraftCabin">座位布局</param>
 /// <param name="aircraftCabinTypeId">舱位类型</param>
 /// <param name="seatNumber">座位数</param>
 /// <param name="note">备注</param>
 public static void SetAircraftCabin(AircraftCabin aircraftCabin, int aircraftCabinTypeId, int seatNumber, string note)
 {
     aircraftCabin.AircraftCabinTypeId = aircraftCabinTypeId;
     aircraftCabin.SeatNumber = seatNumber;
     aircraftCabin.Note = note;
 }
Esempio n. 3
0
        /// <summary>
        /// 新增舱位
        /// </summary>
        /// <returns></returns>
        public AircraftCabin AddNewAircraftCabin()
        {
            var aircraftCabin = new AircraftCabin
            {
                AircraftConfiguratonId = Id,
            };

            aircraftCabin.GenerateNewIdentity();
            AircraftCabins.Add(aircraftCabin);

            return aircraftCabin;
        }
 /// <summary>
 /// 新建座位布局
 /// </summary>
 /// <returns></returns>
 public static AircraftCabin CreateAircraftCabin()
 {
     var aircraftCabin = new AircraftCabin();
     aircraftCabin.GenerateNewIdentity();
     return aircraftCabin;
 }