public ActionResult DeleteConfirmed(int id) { HExtraxEmpleado hExtraxEmpleado = db.HExtraxEmpleadoes.Find(id); db.HExtraxEmpleadoes.Remove(hExtraxEmpleado); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_HEXE,ID_Emple,ID_HExtras,Numero_Horas,Mes")] HExtraxEmpleado hExtraxEmpleado) { if (ModelState.IsValid) { db.Entry(hExtraxEmpleado).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_Emple = new SelectList(db.Empleados, "ID_Emple", "Nombre", hExtraxEmpleado.ID_Emple); ViewBag.ID_HExtras = new SelectList(db.Horas_Extras, "ID_Hextras", "Nombre", hExtraxEmpleado.ID_HExtras); return(View(hExtraxEmpleado)); }
// GET: HExtraxEmpleados/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HExtraxEmpleado hExtraxEmpleado = db.HExtraxEmpleadoes.Find(id); if (hExtraxEmpleado == null) { return(HttpNotFound()); } return(View(hExtraxEmpleado)); }
// GET: HExtraxEmpleados/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HExtraxEmpleado hExtraxEmpleado = db.HExtraxEmpleadoes.Find(id); if (hExtraxEmpleado == null) { return(HttpNotFound()); } ViewBag.ID_Emple = new SelectList(db.Empleados, "ID_Emple", "Nombre", hExtraxEmpleado.ID_Emple); ViewBag.ID_HExtras = new SelectList(db.Horas_Extras, "ID_Hextras", "Nombre", hExtraxEmpleado.ID_HExtras); return(View(hExtraxEmpleado)); }