// GET: Course/Delete/5 public ActionResult Delete(int?id) { CaptureNoteModel captureNoteModels = new CaptureNoteModel(); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var cn = db.captureNotes .Where(o => o.Id == id) .OrderBy(d => d.StudentName).FirstOrDefault(); if (cn == null) { return(HttpNotFound()); } captureNoteModels = new CaptureNoteModel() { CapturedDate = cn.CapturedDate, Email = cn.Email, Id = cn.Id, NoteLink = cn.NoteLink, StudentName = cn.StudentName }; return(View(captureNoteModels)); }
// Get a specified event. public ActionResult Details(int?id) { var facultyMail = Session["facultyMail"].ToString(); CaptureNoteModel captureNoteModels = new CaptureNoteModel(); var cn = db.captureNotes .Where(o => o.Id == id) .OrderBy(d => d.StudentName).FirstOrDefault(); captureNoteModels = new CaptureNoteModel() { CapturedDate = cn.CapturedDate, Email = cn.Email, Id = cn.Id, NoteLink = cn.NoteLink, StudentName = cn.StudentName }; return(View(captureNoteModels)); }