public ActionResult DeleteConfirmed(int id) { recognitions recognitions = db.recognitions.Find(id); db.recognitions.Remove(recognitions); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "recognitionId,ID,description,values")] recognitions recognitions) { if (ModelState.IsValid) { db.Entry(recognitions).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID = new SelectList(db.userProfiles, "ID", "firstName", recognitions.ID); return(View(recognitions)); }
// GET: recognitions/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } recognitions recognitions = db.recognitions.Find(id); if (recognitions == null) { return(HttpNotFound()); } return(View(recognitions)); }
// GET: recognitions/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } recognitions recognitions = db.recognitions.Find(id); if (recognitions == null) { return(HttpNotFound()); } ViewBag.ID = new SelectList(db.userProfiles, "ID", "fullName", recognitions.ID); return(View(recognitions)); }