示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Answer4Value answer4Value = db.Answer4Values.Find(id);

            db.Answer4Values.Remove(answer4Value);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Description")] Answer4Value answer4Value)
 {
     if (ModelState.IsValid)
     {
         db.Entry(answer4Value).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(answer4Value));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "Id,Name,Description")] Answer4Value answer4Value)
        {
            if (ModelState.IsValid)
            {
                db.Answer4Values.Add(answer4Value);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(answer4Value));
        }
示例#4
0
        // GET: Answer4Value/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Answer4Value answer4Value = db.Answer4Values.Find(id);

            if (answer4Value == null)
            {
                return(HttpNotFound());
            }
            return(View(answer4Value));
        }