Esempio n. 1
0
        // GET: GpxRoutes/Details/5
        public ActionResult Details(int?id)
        {
            MapListService mapListService = new MapListService();

            ViewBag.maps = mapListService.GetMapList();

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GpxRoute gpxRoute = db.GpxRoutes.Find(id);

            ViewBag.id  = gpxRoute.Id;
            ViewBag.key = config.BING_KEY;
            GpxOperationsService gpxOperationsService = new GpxOperationsService(gpxRoute.FilePath, gpxRoute.Name);
            GpxData gpxData = gpxOperationsService.GpxData;

            if (gpxRoute == null)
            {
                return(HttpNotFound());
            }
            return(View(gpxData));
        }