Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            telefono_personal telefono_personal = db.telefono_personal.Find(id);

            db.telefono_personal.Remove(telefono_personal);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "id_telefono_personal,num1_personal,num2_personal,fk_rut_personal")] telefono_personal telefono_personal)
 {
     if (ModelState.IsValid)
     {
         db.Entry(telefono_personal).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.fk_rut_personal = new SelectList(db.personal, "rut_personal", "nombre_completo", telefono_personal.fk_rut_personal);
     return(View(telefono_personal));
 }
Beispiel #3
0
        // GET: telefono_personal/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            telefono_personal telefono_personal = db.telefono_personal.Find(id);

            if (telefono_personal == null)
            {
                return(HttpNotFound());
            }
            return(View(telefono_personal));
        }
Beispiel #4
0
        // GET: telefono_personal/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            telefono_personal telefono_personal = db.telefono_personal.Find(id);

            if (telefono_personal == null)
            {
                return(HttpNotFound());
            }
            ViewBag.fk_rut_personal = new SelectList(db.personal, "rut_personal", "nombre_completo", telefono_personal.fk_rut_personal);
            return(View(telefono_personal));
        }