示例#1
0
 public FlightCollection GetFlightsByGroupId(Guid groupId)
 {
     FlightCollection flightsForCurrentGroup = new FlightCollection();
     foreach (Flight flight in items)
     {
         if (flight.CompetitorGroupId == groupId)
         {
             flightsForCurrentGroup.Add(flight);
         }
     }
     return flightsForCurrentGroup;
 }
示例#2
0
 public FlightCollection GetFlightsByCompetitorId(Guid competitorId)
 {
     FlightCollection flightsForCurrentCompetitor = new FlightCollection();
     foreach (Flight flight in items)
     {
         if (flight.CompetitorId == competitorId)
         {
             flightsForCurrentCompetitor.Add(flight);
         }
     }
     return flightsForCurrentCompetitor;
 }