예제 #1
0
 private TravelClass GetTravelClassFromFlight(int legInstanceId, TravelClassType type)
 {
     return(this.LegInstancesServices.GetLegInstance(legInstanceId)
            .Aircraft
            .TravelClasses
            .Where(t => t.Type == type)
            .FirstOrDefault());
 }
예제 #2
0
 private void AddTravelClass(
     TravelClassType type,
     string meal,
     decimal price,
     int aircraftId,
     int numberOfRows,
     int numberOfSeats,
     bool priorityBoarding = false,
     bool earnMiles        = false)
 {
     this.TravelClasses.Add(new TravelClass()
     {
         Type             = type,
         Meal             = meal,
         Price            = price,
         PriorityBoarding = priorityBoarding,
         EarnMiles        = earnMiles,
         NumberOfRows     = numberOfRows,
         NumberOfSeats    = numberOfSeats,
         AircraftId       = aircraftId
     });
 }