public ActionResult DeleteConfirmed(int id)
        {
            ProtocolNotebook protocolNotebook = db.ProtocolNotebooks.Find(id);

            db.ProtocolNotebooks.Remove(protocolNotebook);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "AssayID,AssayName,ProtocolID,EstDaysToComplete,Description,RequireAnimalTesting,ModifiedBy,ModifiedDate,CreatedBy,CreatedDate,ImageLocation")] ProtocolNotebook protocolNotebook)
 {
     if (ModelState.IsValid)
     {
         db.Entry(protocolNotebook).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProtocolID = new SelectList(db.Protocols, "ProtocolID", "ProtocolName", protocolNotebook.ProtocolID);
     return(View(protocolNotebook));
 }
        // GET: ProtocolNotebooks/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProtocolNotebook protocolNotebook = db.ProtocolNotebooks.Find(id);

            if (protocolNotebook == null)
            {
                return(HttpNotFound());
            }
            return(View(protocolNotebook));
        }
        // GET: ProtocolNotebooks/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProtocolNotebook protocolNotebook = db.ProtocolNotebooks.Find(id);

            if (protocolNotebook == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ProtocolID = new SelectList(db.Protocols, "ProtocolID", "ProtocolName", protocolNotebook.ProtocolID);
            return(View(protocolNotebook));
        }
        public ActionResult Create([Bind(Include = "AssayID,AssayName,ProtocolID,EstDaysToComplete,Description,RequireAnimalTesting,ModifiedBy,ModifiedDate,CreatedBy,CreatedDate,ImageLocation")] ProtocolNotebook protocolNotebook)
        {
            protocolNotebook.CreatedDate  = DateTime.Now;
            protocolNotebook.ModifiedDate = DateTime.Now;
            protocolNotebook.CreatedBy    = "Jesse";
            protocolNotebook.ModifiedBy   = "Jesse";
            if (ModelState.IsValid)
            {
                db.ProtocolNotebooks.Add(protocolNotebook);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.ProtocolID = new SelectList(db.Protocols, "ProtocolID", "ProtocolName", protocolNotebook.ProtocolID);
            return(View(protocolNotebook));
        }