public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } int idDefecto = (int)id; DefectoServicio servicio = new DefectoServicio(); RespuestaServicio <DefectoView> defecto = servicio.GetDefecto(idDefecto); if (defecto == null) { return(HttpNotFound()); } return(View(defecto.Respuesta)); }
// GET: Maquinaria/Defectos/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } int idDefecto = (int)id; DefectoServicio servicio = new DefectoServicio(); RespuestaServicio <DefectoView> defecto = servicio.GetDefecto(idDefecto); if (defecto == null) { return(HttpNotFound()); } //ViewBag.IdOrigen = new SelectList(db.Origens, "Id", "Id", defecto.IdOrigen); //ViewBag.IdReportador = new SelectList(db.Personas, "Id", "Nombre", defecto.IdReportador); return(View(defecto.Respuesta)); }