public ActionResult DeleteConfirmed(int id)
        {
            orden orden = db.orden.Find(id);

            db.orden.Remove(orden);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ordenId,usuarioId,ordenTotal,fecha,statusId")] orden orden)
 {
     if (ModelState.IsValid)
     {
         db.Entry(orden).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.statusId  = new SelectList(db.status, "statusId", "statusNombre", orden.statusId);
     ViewBag.usuarioId = new SelectList(db.usuario, "usuarioId", "usuarioCorreo", orden.usuarioId);
     return(View(orden));
 }
        // GET: ordens/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            orden orden = db.orden.Find(id);

            if (orden == null)
            {
                return(HttpNotFound());
            }
            return(View(orden));
        }
        // GET: ordens/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            orden orden = db.orden.Find(id);

            if (orden == null)
            {
                return(HttpNotFound());
            }
            ViewBag.statusId  = new SelectList(db.status, "statusId", "statusNombre", orden.statusId);
            ViewBag.usuarioId = new SelectList(db.usuario, "usuarioId", "usuarioCorreo", orden.usuarioId);
            return(View(orden));
        }