public ActionResult DeleteConfirmed(int id) { nominas nominas = db.nominas.Find(id); db.nominas.Remove(nominas); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,año,mes,monto_total,monto_totalizar")] nominas nominas) { if (ModelState.IsValid) { db.Entry(nominas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.monto_total = new SelectList(db.empleados, "id", "codigo_empleado", nominas.monto_total); return(View(nominas)); }
// GET: nominas/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } nominas nominas = db.nominas.Find(id); if (nominas == null) { return(HttpNotFound()); } return(View(nominas)); }
// GET: nominas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } nominas nominas = db.nominas.Find(id); if (nominas == null) { return(HttpNotFound()); } ViewBag.monto_total = new SelectList(db.empleados, "id", "codigo_empleado", nominas.monto_total); return(View(nominas)); }