Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SpecialChemistryLab specialChemistryLab = db.SpecialChemistryLabs.Find(id);

            db.SpecialChemistryLabs.Remove(specialChemistryLab);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Address,Contact,Result,isDelivered,ReferedBy,TestRequested,Payment")] SpecialChemistryLab specialChemistryLab)
 {
     if (ModelState.IsValid)
     {
         db.Entry(specialChemistryLab).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(specialChemistryLab));
 }
Example #3
0
        // GET: SpecialChemistryLabs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SpecialChemistryLab specialChemistryLab = db.SpecialChemistryLabs.Find(id);

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