Example #1
0
        private TripStatus?GetTripStatus(TripTab tab)
        {
            TripStatus?status;

            switch (tab)
            {
            case TripTab.PendingTrips:
                status = TripStatus.P;
                break;

            case TripTab.StartedTrips:
                status = TripStatus.S;
                break;

            case TripTab.DelayedTrips:
                status = TripStatus.D;
                break;

            case TripTab.FinishedTrips:
                status = TripStatus.F;
                break;

            case TripTab.CancelledTrips:
                status = TripStatus.C;
                break;

            case TripTab.AllTrips:
            default:
                status = null;
                break;
            }
            return(status);
        }
Example #2
0
        public IActionResult _FullInformation(TripTab tab = TripTab.StartedTrips)
        {
            var model = new FullInformationVM
            {
                Tab = tab
            };

            return(PartialView(model));
        }
Example #3
0
        public IActionResult _Trip(TripTab tab = TripTab.StartedTrips)
        {
            var status = GetTripStatus(tab);
            var trips  = ServiceFactory.TripManagement.GetTrips(status?.ToString()).Data;

            var model = new TripsVM
            {
                Trips = trips,
                Tab   = tab
            };

            return(PartialView(model));
        }