public List<Component> GetFlightList(MatrixStopType matrixStopType)
    {
        List<Component> flightList = null;

        switch (matrixStopType)
        {
            case MatrixStopType.ZeroStop:
                flightList = _zeroStopFlightList;
                break;

            case MatrixStopType.OneStop:
                flightList = _oneStopFlightList;
                break;

            case MatrixStopType.MoreThanTwoStop:
                flightList = _moreThanTwoStopFlightList;
                break;

            case MatrixStopType.All:
                flightList = new List<Component>();

                flightList.AddRange(_zeroStopFlightList);
                flightList.AddRange(_oneStopFlightList);
                flightList.AddRange(_moreThanTwoStopFlightList);
                break;
        }

        return new AirLineMatricsManager().GetSortedByPriceFlightList(flightList);
    }
    public void AddFlight(AirMaterial flight, MatrixStopType matrixStopType)
    {
        switch (matrixStopType)
        {
            case MatrixStopType.ZeroStop:
                _zeroStopFlightList.Add(flight);
                break;

            case MatrixStopType.OneStop:
                _oneStopFlightList.Add(flight);
                break;

            case MatrixStopType.MoreThanTwoStop:
                _moreThanTwoStopFlightList.Add(flight);
                break;

            case MatrixStopType.All:
                throw new Exception("You must choose the other type to Add a Flight.");
                break;
        }
    }
    private void ShowFlightByStop(MatrixStopType stopType)
    {
        List<Component> matixFlightList = null;

        matixFlightList = new AirLineMatricsManager().GetFlightListByStop(stopType);

        AvailableFlightList = matixFlightList;

        DoAfterFilter();
    }
Esempio n. 4
0
 public List<Component> GetFlightListByStop(MatrixStopType matrixStopType)
 {
     return AirMatrixFlightsByStop.GetFlightList(matrixStopType);
 }