public ActionResult DeleteConfirmed(int id)
        {
            OrdinaryLevel ordinaryLevel = db.OrdinaryLevels.Find(id);

            db.OrdinaryLevels.Remove(ordinaryLevel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Subject_1,Subject_2,Subject_3,Subject_4,Subject_5,Subject_6,Subject_7,Subject_8,Subject_9,Subject_10,Subject_11")] OrdinaryLevel ordinaryLevel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ordinaryLevel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Id = new SelectList(db.Students, "StudentId", "Name", ordinaryLevel.Id);
     return(View(ordinaryLevel));
 }
        // GET: OrdinaryLevels/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OrdinaryLevel ordinaryLevel = db.OrdinaryLevels.Find(id);

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

            if (ordinaryLevel == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id = new SelectList(db.Students, "StudentId", "Name", ordinaryLevel.Id);
            return(View(ordinaryLevel));
        }