Ejemplo n.º 1
0
        public async Task OnGet(string searchString, int pageIndex = 1)
        {
            ListFlights = await _services.getAllFlightAsync();

            DateTime depDate = new DateTime(10, 11, 12);
            DateTime arrDate = new DateTime(10, 11, 12);

            ListFlightPage = await _serviceVM.GetFlightPageViewModelAsync(ListFlights, depDate, arrDate, searchString, pageIndex);

            ListAirports = await _unitofwork.Airports.GetAllAsync();

            ListRoutes = await _routeServices.getAllRouteAsync();

            ListNameRoutes = new List <string>();
            foreach (var item in ListRoutes)
            {
                Console.WriteLine(item.RouteId + ": " + item.Origin + " - " + item.Destination);
                ListNameRoutes.Add(item.RouteId + ": " + item.Origin + " - " + item.Destination);
            }
            var ListPlanes = await _planeServices.getAllPlaneAsync();

            ListNamePlanes = new List <string>();
            foreach (var item in ListPlanes)
            {
                var s = await _planeServices.getPlaneFullname(item.PlaneId);

                ListNamePlanes.Add(s);
            }
        }