Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Assay assay = db.Assays.Find(id);

            db.Assays.Remove(assay);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "AssayID,AssayName,AssayProtocol,EstimatedDaysToComplete")] Assay assay)
 {
     if (ModelState.IsValid)
     {
         db.Entry(assay).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(assay));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "AssayID,AssayName,AssayProtocol,EstimatedDaysToComplete")] Assay assay)
        {
            if (ModelState.IsValid)
            {
                db.Assays.Add(assay);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(assay));
        }
Esempio n. 4
0
        // GET: Assays/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Assay assay = db.Assays.Find(id);

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