コード例 #1
0
        public ActionResult DeleteConfirmed(decimal id)
        {
            IMPACTO iMPACTO = db.IMPACTO.Find(id);

            db.IMPACTO.Remove(iMPACTO);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ID_IMPACTO,NOMBRE_IMPACTO,DESCRIPCION_IMPACTO,VALOR_IMPACTO,RUT_EMPRESA_PROV")] IMPACTO iMPACTO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(iMPACTO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(iMPACTO));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "ID_IMPACTO,NOMBRE_IMPACTO,DESCRIPCION_IMPACTO,VALOR_IMPACTO,RUT_EMPRESA_PROV")] IMPACTO iMPACTO)
        {
            if (ModelState.IsValid)
            {
                db.IMPACTO.Add(iMPACTO);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(iMPACTO));
        }
コード例 #4
0
        // GET: IMPACTOes/Delete/5
        public ActionResult Delete(decimal id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IMPACTO iMPACTO = db.IMPACTO.Find(id);

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