public ActionResult Aprobar(int?id) { try { Planner_mantenimiento planner_mantenimiento = db.Planner_mantenimiento.Where(f => f.CodPlanner == id).FirstOrDefault(); planner_mantenimiento.CodEstado = 3; db.Entry(planner_mantenimiento).State = EntityState.Modified; db.SaveChanges(); } catch (Exception ex) { utils.EventLogger.EscribirLog(ex.ToString()); } return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CodPlanner,CodPeriodo,CodInstalacion,FechaProg,codestado")] Programacion programacion) { if (ModelState.IsValid) { db.Entry(programacion).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(programacion)); }
public ActionResult Edit([Bind(Include = "CodConsolidado,FechaRegistro,CodPlanner,CodPeriodo,CodEstado")] Calidad_Mantenimiento calidad_Mantenimiento) { if (ModelState.IsValid) { db.Entry(calidad_Mantenimiento).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(calidad_Mantenimiento)); }
public ActionResult Edit([Bind(Include = "CodArticulo,NomArticulo,UnidMedida,Modelo,Observacion")] Articulo articulo) { if (ModelState.IsValid) { db.Entry(articulo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(articulo)); }
public ActionResult Edit([Bind(Include = "CodPeriodo,NomPeriodo,NomActividad,FechaInicio,FechaFin")] Periodo_Academico periodo_Academico) { if (ModelState.IsValid) { db.Entry(periodo_Academico).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(periodo_Academico)); }
public ActionResult Edit([Bind(Include = "CodInstalacion,NomInstalacion,AbrevInstalacion,Aforo")] Instalacion instalacion) { if (ModelState.IsValid) { db.Entry(instalacion).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(instalacion)); }
public ActionResult Edit([Bind(Include = "CodTarea,NomTarea,AbrevTarea")] Tarea tarea) { if (ModelState.IsValid) { if (exists(tarea) == false) { db.Entry(tarea).State = EntityState.Modified; db.SaveChanges(); } return(RedirectToAction("Index")); } return(View(tarea)); }