Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            UserTests userTests = db.UserTests.Find(id);

            db.UserTests.Remove(userTests);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,TestId,ReasonForTestUsed,TestRawData,TestReturnedData,Result,Interpretation")] UserTests userTests)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userTests).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(userTests));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Id,TestId,ReasonForTestUsed,TestRawData,TestReturnedData,Result,Interpretation")] UserTests userTests)
        {
            if (ModelState.IsValid)
            {
                db.UserTests.Add(userTests);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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