Example #1
0
        public ActionResult DeleteConfirmed(DateTime id)
        {
            GapsTable gapsTable = db.GapsTables.Find(id);

            db.GapsTables.Remove(gapsTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "GapStart,GapEnd")] GapsTable gapsTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gapsTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gapsTable));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "GapStart,GapEnd")] GapsTable gapsTable)
        {
            if (ModelState.IsValid)
            {
                db.GapsTables.Add(gapsTable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(gapsTable));
        }
Example #4
0
        // GET: GapsTables/Delete/5
        public ActionResult Delete(DateTime id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GapsTable gapsTable = db.GapsTables.Find(id);

            if (gapsTable == null)
            {
                return(HttpNotFound());
            }
            return(View(gapsTable));
        }