示例#1
0
        public ActionResult DeleteConfirmed(decimal id)
        {
            PARTXREF pARTXREF = db.PARTXREFs.Find(id);

            db.PARTXREFs.Remove(pARTXREF);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID,PARTNO,PlantID")] PARTXREF pARTXREF)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pARTXREF).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pARTXREF));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "ID,PARTNO,PlantID")] PARTXREF pARTXREF)
        {
            if (ModelState.IsValid)
            {
                db.PARTXREFs.Add(pARTXREF);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(pARTXREF));
        }
示例#4
0
        // GET: PARTXREFs/Delete/5
        public ActionResult Delete(decimal id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PARTXREF pARTXREF = db.PARTXREFs.Find(id);

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