Пример #1
0
        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"));
        }
Пример #2
0
 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));
 }
Пример #3
0
        // 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));
        }
Пример #4
0
        // 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));
        }