示例#1
0
        public ActionResult DeleteConfirmed(int?CompoundLT, int?CompoundSequenceCode)
        {
            CompoundSample compoundSample = db.CompoundSamples.Find(CompoundLT, CompoundSequenceCode);

            db.CompoundSamples.Remove(compoundSample);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "CompoundLT,CompoundSequenceCode,AssayID,QuantityMg,Appearance")] CompoundSample compoundSample)
 {
     if (ModelState.IsValid)
     {
         db.Entry(compoundSample).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(compoundSample));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "CompoundLT,CompoundSequenceCode,AssayID,QuantityMg,Appearance")] CompoundSample compoundSample)
        {
            if (ModelState.IsValid)
            {
                db.CompoundSamples.Add(compoundSample);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(compoundSample));
        }
示例#4
0
        // GET: Employees/CompoundSamples/Delete/5
        public ActionResult Delete(int?CompoundLT, int?CompoundSequenceCode)
        {
            if (CompoundLT == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CompoundSample compoundSample = db.CompoundSamples.Find(CompoundLT, CompoundSequenceCode);

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