public CarStateAlertController(CarStateAlertService alertService, UserService userSevice, LocalizationService localizationService, EmergencyService emergencyService) { _alertService = alertService; _userService = userSevice; _localizationService = localizationService; _emergencyService = emergencyService; }
public ActionResult DeleteConfirmed(int id) { EmergencyService emergencyService = db.EmergencyServices.Find(id); db.EmergencyServices.Remove(emergencyService); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Name,Number")] EmergencyService emergencyService) { if (ModelState.IsValid) { db.Entry(emergencyService).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(emergencyService)); }
public ActionResult Create([Bind(Include = "ID,Name,Number")] EmergencyService emergencyService) { if (ModelState.IsValid) { db.EmergencyServices.Add(emergencyService); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(emergencyService)); }
// GET: EmergencyServices/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmergencyService emergencyService = db.EmergencyServices.Find(id); if (emergencyService == null) { return(HttpNotFound()); } return(View(emergencyService)); }
public EmergencyController(EmergencyService emergencyService, UserService userSevice) { _emergencyService = emergencyService; _userService = userSevice; }