public ActionResult DeleteConfirmed(int id)
        {
            Schelude schelude = db.Schelude.Find(id);

            db.Schelude.Remove(schelude);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ScheludeId,Shift,Scheludes,Cinema_CinemaId,Day_DayId,Room_RoomId")] Schelude schelude)
 {
     if (ModelState.IsValid)
     {
         db.Entry(schelude).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Cinema_CinemaId = new SelectList(db.Cinema, "CinemaId", "Name", schelude.Cinema_CinemaId);
     ViewBag.Day_DayId       = new SelectList(db.Day, "DayId", "Days", schelude.Day_DayId);
     ViewBag.Room_RoomId     = new SelectList(db.Room, "RoomId", "Number", schelude.Room_RoomId);
     return(View(schelude));
 }
        // GET: Scheludes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Schelude schelude = db.Schelude.Find(id);

            if (schelude == null)
            {
                return(HttpNotFound());
            }
            return(View(schelude));
        }
        // GET: Scheludes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Schelude schelude = db.Schelude.Find(id);

            if (schelude == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Cinema_CinemaId = new SelectList(db.Cinema, "CinemaId", "Name", schelude.Cinema_CinemaId);
            ViewBag.Day_DayId       = new SelectList(db.Day, "DayId", "Days", schelude.Day_DayId);
            ViewBag.Room_RoomId     = new SelectList(db.Room, "RoomId", "Number", schelude.Room_RoomId);
            return(View(schelude));
        }