public ActionResult DeleteConfirmed(int id) { AttendancePerDay attendancePerDay = db.AttendancePerDay.Find(id); db.AttendancePerDay.Remove(attendancePerDay); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,TimetablePerDayId,StudentId,M_IN,M_OUT,M_Status,A_IN,A_OUT,A_Status,Total_Marks,Total_Status,Remarks,CreatedDate,CreatedBy,UpdatedDate,UpdateBy,Status")] AttendancePerDay attendancePerDay) { if (ModelState.IsValid) { db.Entry(attendancePerDay).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.StudentId = new SelectList(db.Student, "Id", "Name", attendancePerDay.StudentId); ViewBag.TimetablePerDayId = new SelectList(db.TimetablePerDay, "Id", "MorningRemark", attendancePerDay.TimetablePerDayId); return(View(attendancePerDay)); }
// GET: AttendancePerDay/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AttendancePerDay attendancePerDay = db.AttendancePerDay.Find(id); if (attendancePerDay == null) { return(HttpNotFound()); } return(View(attendancePerDay)); }
// GET: AttendancePerDay/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AttendancePerDay attendancePerDay = db.AttendancePerDay.Find(id); if (attendancePerDay == null) { return(HttpNotFound()); } ViewBag.StudentId = new SelectList(db.Student, "Id", "Name", attendancePerDay.StudentId); ViewBag.TimetablePerDayId = new SelectList(db.TimetablePerDay, "Id", "MorningRemark", attendancePerDay.TimetablePerDayId); return(View(attendancePerDay)); }