Delete service reminder and vehicle service

This commit is contained in:
2016-08-24 08:02:29 -04:00
parent a9cb9d36b5
commit 5d6f060378
8 changed files with 89 additions and 8 deletions
@@ -193,6 +193,23 @@ namespace MileageTraker.Web.Controllers
return View(viewModel);
}
public ActionResult Delete(int id)
{
var vehicleService = DataService.GetVehicleService(id);
var viewModel = new VehicleServiceViewModel(vehicleService);
return View(viewModel);
}
[HttpPost, ActionName("Delete")]
[ActionLog]
public ActionResult DeleteConfirmed(int id)
{
DataService.DeleteVehicleService(id);
SetStatusMessage("Vehicle Service deleted");
return RedirectToAction("Index");
}
[HttpPost]
[ActionLog]
public ActionResult Edit(VehicleServiceViewModel viewModel)