Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EnrollMark enrollMark = db.EnrollMarks.Find(id);

            db.EnrollMarks.Remove(enrollMark);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Year,Target,DepartmentId")] EnrollMark enrollMark)
 {
     if (ModelState.IsValid)
     {
         db.Entry(enrollMark).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DepartmentId = new SelectList(db.Departments, "Id", "Name", enrollMark.DepartmentId);
     return(View(enrollMark));
 }
Ejemplo n.º 3
0
        // GET: EnrollMarks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EnrollMark enrollMark = db.EnrollMarks.Find(id);

            if (enrollMark == null)
            {
                return(HttpNotFound());
            }
            return(View(enrollMark));
        }
Ejemplo n.º 4
0
        // GET: EnrollMarks/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EnrollMark enrollMark = db.EnrollMarks.Find(id);

            if (enrollMark == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DepartmentId = new SelectList(db.Departments, "Id", "Name", enrollMark.DepartmentId);
            return(View(enrollMark));
        }