示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            STIREsult sTIREsult = db.STIREsults.Find(id);

            db.STIREsults.Remove(sTIREsult);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID,STI,Result,PersonID,Deleted,ResultsDate")] STIREsult sTIREsult)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sTIREsult).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonID = new SelectList(db.People, "ID", "Name", sTIREsult.PersonID);
     return(View(sTIREsult));
 }
示例#3
0
        public ActionResult Create(STIREsult sTIREsult)
        {
            if (ModelState.IsValid)
            {
                db.STIREsults.Add(sTIREsult);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.PersonID = new SelectList(db.People, "ID", "Name", sTIREsult.PersonID);
            return(View(sTIREsult));
        }
示例#4
0
        // GET: STIREsults/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            STIREsult sTIREsult = db.STIREsults.Find(id);

            if (sTIREsult == null)
            {
                return(HttpNotFound());
            }
            return(View(sTIREsult));
        }
示例#5
0
        // GET: STIREsults/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            STIREsult sTIREsult = db.STIREsults.Find(id);

            if (sTIREsult == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PersonID = new SelectList(db.People, "ID", "Name", sTIREsult.PersonID);
            return(View(sTIREsult));
        }