Beispiel #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            tblMediumPrepType tblmediumpreptype = db.tblMediumPrepTypes.Find(id);

            db.tblMediumPrepTypes.Remove(tblmediumpreptype);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "typeId,typename")] tblMediumPrepType tblmediumpreptype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblmediumpreptype).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblmediumpreptype));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "typeId,typename")] tblMediumPrepType tblmediumpreptype)
        {
            if (ModelState.IsValid)
            {
                db.tblMediumPrepTypes.Add(tblmediumpreptype);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tblmediumpreptype));
        }
Beispiel #4
0
        // GET: /MediumPrepType/Delete/5
        public ActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tblMediumPrepType tblmediumpreptype = db.tblMediumPrepTypes.Find(id);

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