예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PABELLON pABELLON = db.PABELLON.Find(id);

            db.PABELLON.Remove(pABELLON);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "cod_pab,nrp_pab,nra_pab,nap_pab")] PABELLON pABELLON)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pABELLON).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pABELLON));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "cod_pab,nrp_pab,nra_pab,nap_pab")] PABELLON pABELLON)
        {
            if (ModelState.IsValid)
            {
                db.PABELLON.Add(pABELLON);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(pABELLON));
        }
예제 #4
0
        // GET: Pabellon/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PABELLON pABELLON = db.PABELLON.Find(id);

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