public ActionResult Index(int BandId) { GetAccidentLocation objGetLocation = new GetAccidentLocation(); Location objLocation = objGetLocation.Get(); ViewBag.Latitude = objLocation.Longitude; ViewBag.Longitude = objLocation.Latitude; return(View()); }
public ActionResult ShowRoute() { GetAccidentLocation objLocation = new GetAccidentLocation(); string Location = objLocation.Get(); if (Location == "NIL") { return(View("Index")); } else { TempData["Location"] = Location; return(RedirectToAction("Map")); } }
public ActionResult ShowRoute() { GetAccidentLocation objLocation = new GetAccidentLocation(); Location Location = objLocation.Get(); if (Location.Latitude == "NIL" || Location.Longitude == "NIL") { return(View("Index")); } else { TempData["Location"] = Location.Address; TempData["Latitude"] = Location.Latitude; TempData["Longitude"] = Location.Longitude; return(RedirectToAction("Map")); } }