Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            HomotologyLab homotologyLab = db.HomotologyLabs.Find(id);

            db.HomotologyLabs.Remove(homotologyLab);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID,Name,Address,Contact,Result,isDelivered,ReferedBy,TestRequested,Payment")] HomotologyLab homotologyLab)
 {
     if (ModelState.IsValid)
     {
         db.Entry(homotologyLab).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(homotologyLab));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "ID,Name,Address,Contact,Result,isDelivered,ReferedBy,TestRequested,Payment")] HomotologyLab homotologyLab)
        {
            if (ModelState.IsValid)
            {
                db.HomotologyLabs.Add(homotologyLab);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(homotologyLab));
        }
Exemplo n.º 4
0
        // GET: HomotologyLabs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HomotologyLab homotologyLab = db.HomotologyLabs.Find(id);

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