public ActionResult DeleteConfirmed(int id)
        {
            CriterioAfp criterioAfp = db.Tb_CriterioAfp.Find(id);

            db.Tb_CriterioAfp.Remove(criterioAfp);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 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));
 }
        // 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));
        }
        // 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));
        }