public ActionResult DeleteConfirmed(int id)
        {
            StudentAssignmentGrades studentAssignmentGrades = db.StudentAssignmentGrades.Find(id);

            db.StudentAssignmentGrades.Remove(studentAssignmentGrades);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "StuID,AssignID,PointsAwarded,Grade")] StudentAssignmentGrades studentAssignmentGrades)
 {
     if (ModelState.IsValid)
     {
         db.Entry(studentAssignmentGrades).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AssignID = new SelectList(db.Assignments, "AssignmentID", "Title", studentAssignmentGrades.AssignID);
     ViewBag.StuID    = new SelectList(db.Students, "StudentID", "FirstName", studentAssignmentGrades.StuID);
     return(View(studentAssignmentGrades));
 }
        // GET: StudentAssignmentGrades/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StudentAssignmentGrades studentAssignmentGrades = db.StudentAssignmentGrades.Find(id);

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

            if (studentAssignmentGrades == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AssignID = new SelectList(db.Assignments, "AssignmentID", "Title", studentAssignmentGrades.AssignID);
            ViewBag.StuID    = new SelectList(db.Students, "StudentID", "FirstName", studentAssignmentGrades.StuID);
            return(View(studentAssignmentGrades));
        }