public ActionResult DeleteConfirmed(string id) { administrativos administrativos = db.administrativos.Find(id); db.administrativos.Remove(administrativos); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "nombrepersona,codigopersona,areaadministrativa,telefono")] administrativos administrativos) { if (ModelState.IsValid) { db.Entry(administrativos).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(administrativos)); }
public ActionResult Create([Bind(Include = "nombrepersona,codigopersona,areaadministrativa,telefono")] administrativos administrativos) { if (ModelState.IsValid) { db.administrativos.Add(administrativos); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(administrativos)); }
// GET: administrativos/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } administrativos administrativos = db.administrativos.Find(id); if (administrativos == null) { return(HttpNotFound()); } return(View(administrativos)); }