Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            LibTestBlood libTestBlood = db.LibTest.Find(id);

            db.LibTest.Remove(libTestBlood);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Address,Contact,Result,isDelivered")] LibTestBlood libTestBlood)
 {
     if (ModelState.IsValid)
     {
         db.Entry(libTestBlood).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(libTestBlood));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "ID,Name,Address,Contact,Result,isDelivered")] LibTestBlood libTestBlood)
        {
            if (ModelState.IsValid)
            {
                db.LibTest.Add(libTestBlood);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(libTestBlood));
        }
Example #4
0
        // GET: LibTestBloods/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LibTestBlood libTestBlood = db.LibTest.Find(id);

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