Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SurveyLuisViewModel surveyLuisViewModel = db.SurveyLuisViewModels.Find(id);

            db.SurveyLuisViewModels.Remove(surveyLuisViewModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Question01,Question02,Question03,Question04")] SurveyLuisViewModel surveyLuisViewModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(surveyLuisViewModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(surveyLuisViewModel));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,Question01,Question02,Question03,Question04")] SurveyLuisViewModel surveyLuisViewModel)
        {
            if (ModelState.IsValid)
            {
                db.SurveyLuisViewModels.Add(surveyLuisViewModel);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(surveyLuisViewModel));
        }
Esempio n. 4
0
        // GET: /SurveyLuisViewModels/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SurveyLuisViewModel surveyLuisViewModel = db.SurveyLuisViewModels.Find(id);

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