コード例 #1
0
        public async Task <ActionResult> UpcomingTrips()
        {
            UpcomingTripsViewModel tripsModel = new UpcomingTripsViewModel();

            tripsModel.Trips = await mHomeDataManager.GetUpcomingTrips(User.Identity.GetUserName());

            TempData["CurrentUpcomingTrips"] = tripsModel.Trips;
            return(View(tripsModel));
        }
コード例 #2
0
        //
        // GET: /TripDashboard/
        public async Task <ActionResult> Index()
        {
            TripDashboardViewModel tripDashboardModel = new TripDashboardViewModel();

            tripDashboardModel.SearchCriteria = new TripSearchCriteria()
            {
            };

            tripDashboardModel.PastTrips = await mHomeDataManager.GetPastTrips(User.Identity.GetUserName());

            tripDashboardModel.UpcomingTrips = await mHomeDataManager.GetUpcomingTrips(User.Identity.GetUserName());

            TempData["CurrentUpcomingTrips"] = tripDashboardModel.UpcomingTrips;

            return(View("TripDashboard", tripDashboardModel));
        }