コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CriterioAfp criterioAfp = db.Tb_CriterioAfp.Find(id);

            db.Tb_CriterioAfp.Remove(criterioAfp);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Crit_Id,Crit_Nom,Crit_Porcentaje,Crit_Registro,CicloPHVA_Id,Categoria,CategoriaExcepcion")] CriterioAfp criterioAfp)
 {
     if (ModelState.IsValid)
     {
         db.Entry(criterioAfp).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CicloPHVA_Id = new SelectList(db.Tb_cicloPHVAAfps, "Id", "Nombre", criterioAfp.CicloPHVA_Id);
     return(View(criterioAfp));
 }
コード例 #3
0
        // GET: CriterioAfps/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CriterioAfp criterioAfp = db.Tb_CriterioAfp.Find(id);

            if (criterioAfp == null)
            {
                return(HttpNotFound());
            }
            return(View(criterioAfp));
        }
コード例 #4
0
        // GET: CriterioAfps/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CriterioAfp criterioAfp = db.Tb_CriterioAfp.Find(id);

            if (criterioAfp == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CicloPHVA_Id = new SelectList(db.Tb_cicloPHVAAfps, "Id", "Nombre", criterioAfp.CicloPHVA_Id);
            return(View(criterioAfp));
        }