public ActionResult DeleteConfirmed(decimal id) { ATTENDANCE_DETAILS aTTENDANCE_DETAILS = db.ATTENDANCE_DETAILS.Find(id); db.ATTENDANCE_DETAILS.Remove(aTTENDANCE_DETAILS); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ATTENDANCE_ID,CLASS_ID,STUDENT_ID,ATTENDANCE_DATE")] ATTENDANCE_DETAILS aTTENDANCE_DETAILS) { if (ModelState.IsValid) { db.Entry(aTTENDANCE_DETAILS).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CLASS_ID = new SelectList(db.CLASS_DETAILS, "CLASS_ID", "CLASS_NAME", aTTENDANCE_DETAILS.CLASS_ID); ViewBag.STUDENT_ID = new SelectList(db.STUDENT_DETAILS, "STUDENT_ID", "FIRST_NAME", aTTENDANCE_DETAILS.STUDENT_ID); return(View(aTTENDANCE_DETAILS)); }
// GET: ATTENDANCE_DETAILS/Details/5 public ActionResult Details(decimal id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ATTENDANCE_DETAILS aTTENDANCE_DETAILS = db.ATTENDANCE_DETAILS.Find(id); if (aTTENDANCE_DETAILS == null) { return(HttpNotFound()); } return(View(aTTENDANCE_DETAILS)); }
// GET: ATTENDANCE_DETAILS/Edit/5 public ActionResult Edit(decimal id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ATTENDANCE_DETAILS aTTENDANCE_DETAILS = db.ATTENDANCE_DETAILS.Find(id); if (aTTENDANCE_DETAILS == null) { return(HttpNotFound()); } ViewBag.CLASS_ID = new SelectList(db.CLASS_DETAILS, "CLASS_ID", "CLASS_NAME", aTTENDANCE_DETAILS.CLASS_ID); ViewBag.STUDENT_ID = new SelectList(db.STUDENT_DETAILS, "STUDENT_ID", "FIRST_NAME", aTTENDANCE_DETAILS.STUDENT_ID); return(View(aTTENDANCE_DETAILS)); }