public Trip GetTrip(DirectionsRouteModel directionsRoute)
        {
            DirectionsRouteModel driverRoute = this.Session[SessionKeys.ROUTE] as DirectionsRouteModel;
            this.Session[SessionKeys.ROUTE] = null;

            Trip trip = new Trip();
            trip.AvailablePlacesCount = directionsRoute.Free;
            trip.CarId = 1;
            trip.CostOneSeat = directionsRoute.Price;
            trip.TripTime = driverRoute.Date;
            trip.Driver.Login = this.User.Identity.Name;
            trip.AdditionalInfo = directionsRoute.AdditionalInfo;

            Location[] locations = driverRoute.GetLocations();
            for (int a = 0; a < locations.Length; a++)
            {
                trip.RouteLocations.Add(new LocationInfo(locations[a].Latitude, locations[a].Longitude));
            }

            return trip;
        }
        public ActionResult SuggestTripNext(DirectionsRouteModel directionsRoute)
        {
            this._tripManager.AddNew(this.GetTrip(directionsRoute));

            return this.RedirectToAction("Index","Home");
        }
 public ActionResult SuggestTrip(DirectionsRouteModel directionsRoute)
 {
     this.Session[SessionKeys.ROUTE] = directionsRoute;
     return this.RedirectToAction("SuggestTripNext", "SuggestTrip");
 }