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