Beispiel #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            Survey1Results survey1Results = db.Survey1Results.Find(id);

            db.Survey1Results.Remove(survey1Results);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Medium,Classification,ImageUrl,Name,ID")] Survey1Results survey1Results)
 {
     if (ModelState.IsValid)
     {
         db.Entry(survey1Results).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(survey1Results));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Medium,Classification,ImageUrl,Name,ID")] Survey1Results survey1Results)
        {
            if (ModelState.IsValid)
            {
                db.Survey1Results.Add(survey1Results);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(survey1Results));
        }
Beispiel #4
0
        // GET: Survey1Results/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Survey1Results survey1Results = db.Survey1Results.Find(id);

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