Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            LaggageSetting laggageSetting = db.LaggageSettings.Find(id);

            db.LaggageSettings.Remove(laggageSetting);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 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));
 }
Beispiel #3
0
        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));
        }
Beispiel #4
0
        // 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));
        }