diff --git a/src/Maps/Controllers/BusStopController.cs b/src/Maps/Controllers/BusStopController.cs index b066b78..15682b6 100755 --- a/src/Maps/Controllers/BusStopController.cs +++ b/src/Maps/Controllers/BusStopController.cs @@ -86,44 +86,44 @@ namespace Maps.Controllers } - // POST: BusStop/Create - // To protect from overposting attacks, please enable the specific properties you want to bind to, for - // more details see http://go.microsoft.com/fwlink/?LinkId=317598. - [HttpPost] - [ValidateAntiForgeryToken] - public async Task Create( busStop) - { - if (ModelState.IsValid) - { - _context.Add(busStop); - await _context.SaveChangesAsync(); - return RedirectToAction("Index"); - } - ViewData["RegionId"] = new SelectList(_context.Region, "RegionId", "RegionId", busStop.RegionId); - ViewData["RoadId"] = new SelectList(_context.Road, "RoadId", "RoadId", busStop.RoadId); - ViewData["SettlementId"] = new SelectList(_context.Settlement, "SettlementId", "Name", busStop.SettlementId); - ViewData["StateCommonId"] = new SelectList(_context.StateCommon, "StateCommonId", "StateCommonId", busStop.StateCommonId); - ViewData["SurfaceTypeId"] = new SelectList(_context.SurfaceType, "SurfaceTypeId", "SurfaceTypeId", busStop.SurfaceTypeId); - return View(busStop); - } + // // POST: BusStop/Create + // // To protect from overposting attacks, please enable the specific properties you want to bind to, for + // // more details see http://go.microsoft.com/fwlink/?LinkId=317598. + // [HttpPost] + // [ValidateAntiForgeryToken] + // public async Task Create( busStop) + // { + // if (ModelState.IsValid) + // { + // _context.Add(busStop); + // await _context.SaveChangesAsync(); + // return RedirectToAction("Index"); + // } + // ViewData["RegionId"] = new SelectList(_context.Region, "RegionId", "RegionId", busStop.RegionId); + // ViewData["RoadId"] = new SelectList(_context.Road, "RoadId", "RoadId", busStop.RoadId); + // ViewData["SettlementId"] = new SelectList(_context.Settlement, "SettlementId", "Name", busStop.SettlementId); + // ViewData["StateCommonId"] = new SelectList(_context.StateCommon, "StateCommonId", "StateCommonId", busStop.StateCommonId); + // ViewData["SurfaceTypeId"] = new SelectList(_context.SurfaceType, "SurfaceTypeId", "SurfaceTypeId", busStop.SurfaceTypeId); + // return View(busStop); + // } [HttpDelete] public async Task Delete(int? id) - { - if (id == null) - { - return NotFound(); - } - int busStop; + { try { - busStop = await _busStopDs.DeleteAsync(id); + if (id == null) + { + return NotFound(); + } + + int busStop = await _busStopDs.DeleteAsync(id); + return Json(busStop); } catch (ArgumentNullException e) { return NotFound(); } - return Json(busStop); } -- libgit2 0.21.4