public async Task <ActionResult> DeleteConfirmed(int id)
        {
            InformacionHardware informacionHardware = await db.InformacionesHardware.FindAsync(id);

            db.InformacionesHardware.Remove(informacionHardware);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        // GET: InformacionHardwar/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InformacionHardware informacionHardware = await db.InformacionesHardware.FindAsync(id);

            if (informacionHardware == null)
            {
                return(HttpNotFound());
            }
            return(View(informacionHardware));
        }
        public async Task <ActionResult> Edit([Bind(Include = "EquipoId,NumeroSerie,FabricanteId,MarcaId,ModeloId")] InformacionHardware informacionHardware)
        {
            if (ModelState.IsValid)
            {
                db.Entry(informacionHardware).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.EquipoId     = new SelectList(db.Equipos, "EquipoId", "NombreCompleto", informacionHardware.EquipoId);
            ViewBag.FabricanteId = new SelectList(db.Fabricantes, "FabricanteId", "Nombre", informacionHardware.FabricanteId);
            ViewBag.MarcaId      = new SelectList(db.Marcas, "MarcaId", "Nombre", informacionHardware.MarcaId);
            ViewBag.ModeloId     = new SelectList(db.Modelos, "ModeloId", "Nombre", informacionHardware.ModeloId);
            return(View(informacionHardware));
        }
        // GET: InformacionHardwar/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InformacionHardware informacionHardware = await db.InformacionesHardware.FindAsync(id);

            if (informacionHardware == null)
            {
                return(HttpNotFound());
            }
            ViewBag.EquipoId     = new SelectList(db.Equipos, "EquipoId", "NombreCompleto", informacionHardware.EquipoId);
            ViewBag.FabricanteId = new SelectList(db.Fabricantes, "FabricanteId", "Nombre", informacionHardware.FabricanteId);
            ViewBag.MarcaId      = new SelectList(db.Marcas, "MarcaId", "Nombre", informacionHardware.MarcaId);
            ViewBag.ModeloId     = new SelectList(db.Modelos, "ModeloId", "Nombre", informacionHardware.ModeloId);
            return(View(informacionHardware));
        }