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

            db.CAT_PersonaVulnerable.Remove(cAT_PersonaVulnerable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "id,clave,descripcion")] CAT_PersonaVulnerable cAT_PersonaVulnerable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cAT_PersonaVulnerable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cAT_PersonaVulnerable));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "id,clave,descripcion")] CAT_PersonaVulnerable cAT_PersonaVulnerable)
        {
            if (ModelState.IsValid)
            {
                db.CAT_PersonaVulnerable.Add(cAT_PersonaVulnerable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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