Exemple #1
0
        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));
        }
Exemple #2
0
        // 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));
        }