Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            QuestionResult questionResult = db.QuestionResult.Find(id);

            db.QuestionResult.Remove(questionResult);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ID,QuestionID,StudentID,AnswerText")] QuestionResult questionResult)
 {
     if (ModelState.IsValid)
     {
         db.Entry(questionResult).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(questionResult));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "ID,QuestionID,StudentID,AnswerText")] QuestionResult questionResult)
        {
            if (ModelState.IsValid)
            {
                db.QuestionResult.Add(questionResult);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(questionResult));
        }
Esempio n. 4
0
        // GET: QuestionResults/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            QuestionResult questionResult = db.QuestionResult.Find(id);

            if (questionResult == null)
            {
                return(HttpNotFound());
            }
            return(View(questionResult));
        }
Esempio n. 5
0
        // GET: QuestionResults/Edit/5
        public ActionResult Edit(int?id)
        {
            QuestionResultsDropdown();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            QuestionResult questionResult = db.QuestionResult.Find(id);

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