public ActionResult DeleteConfirmed(int id) { OS_Alarm oS_Alarm = db.OS_Alarm.Find(id); db.OS_Alarm.Remove(oS_Alarm); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "alarmID,alarm")] OS_Alarm oS_Alarm) { if (ModelState.IsValid) { db.Entry(oS_Alarm).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(oS_Alarm)); }
public ActionResult Create([Bind(Include = "alarmID,alarm")] OS_Alarm oS_Alarm) { if (ModelState.IsValid) { db.OS_Alarm.Add(oS_Alarm); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(oS_Alarm)); }
// GET: OS_Alarm/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OS_Alarm oS_Alarm = db.OS_Alarm.Find(id); if (oS_Alarm == null) { return(HttpNotFound()); } return(View(oS_Alarm)); }