public ActionResult DeleteConfirmed(int id) { SecurityCheck_tbl securitycheck_tbl = db.SecurityCheck_tbl.Find(id); db.SecurityCheck_tbl.Remove(securitycheck_tbl); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,UserId,SecurityQuestion,Answer,UpdateDate")] SecurityCheck_tbl securitycheck_tbl) { if (ModelState.IsValid) { db.Entry(securitycheck_tbl).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.UserId = new SelectList(db.User_tbl, "UserId", "UserName", securitycheck_tbl.UserId); return(View(securitycheck_tbl)); }
// GET: /SecurityCheck/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SecurityCheck_tbl securitycheck_tbl = db.SecurityCheck_tbl.Find(id); if (securitycheck_tbl == null) { return(HttpNotFound()); } return(View(securitycheck_tbl)); }
// GET: /SecurityCheck/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SecurityCheck_tbl securitycheck_tbl = db.SecurityCheck_tbl.Find(id); if (securitycheck_tbl == null) { return(HttpNotFound()); } ViewBag.UserId = new SelectList(db.User_tbl, "UserId", "UserName", securitycheck_tbl.UserId); return(View(securitycheck_tbl)); }