Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RoomOverlap roomOverlap = db.RoomOverlaps.Find(id);

            db.RoomOverlaps.Remove(roomOverlap);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,Overlap")] RoomOverlap roomOverlap)
 {
     if (ModelState.IsValid)
     {
         db.Entry(roomOverlap).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(roomOverlap));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "Id,Overlap")] RoomOverlap roomOverlap)
        {
            if (ModelState.IsValid)
            {
                db.RoomOverlaps.Add(roomOverlap);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(roomOverlap));
        }
Пример #4
0
        // GET: RoomOverlaps/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RoomOverlap roomOverlap = db.RoomOverlaps.Find(id);

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