Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RECEPCION rECEPCION = db.RECEPCION.Find(id);

            db.RECEPCION.Remove(rECEPCION);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID_PRODUCTO,CLIENTE,PRODUCTO,ESTADO,FECHA_REGISTRO,ORIGEN,DESTINO,PESO,PRECIO")] RECEPCION rECEPCION)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rECEPCION).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CLIENTE = new SelectList(db.CLIENTES, "ID_CLIENTE", "NOMBRES", rECEPCION.CLIENTE);
     ViewBag.DESTINO = new SelectList(db.SUCURSAL, "ID_SUCURSAL", "NOMBRE", rECEPCION.DESTINO);
     return(View(rECEPCION));
 }
Example #3
0
        // GET: RECEPCION/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RECEPCION rECEPCION = db.RECEPCION.Find(id);

            if (rECEPCION == null)
            {
                return(HttpNotFound());
            }
            return(View(rECEPCION));
        }
        public ActionResult Create([Bind(Include = "ID_PRODUCTO,CLIENTE,PRODUCTO,ESTADO,FECHA_REGISTRO,ORIGEN,DESTINO,PESO,PRECIO")] RECEPCION rECEPCION)
        {
            if (ModelState.IsValid)

            {
                db.RECEPCION.Add(rECEPCION);
                db.SaveChanges();
                return(RedirectToAction("busquedafilter"));
            }

            ViewBag.CLIENTE = new SelectList(db.CLIENTES, "ID_CLIENTE", "NOMBRES", rECEPCION.CLIENTE);
            ViewBag.DESTINO = new SelectList(db.SUCURSAL, "ID_SUCURSAL", "NOMBRE", rECEPCION.DESTINO);
            return(View(rECEPCION));
        }
Example #5
0
        // GET: RECEPCION/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RECEPCION rECEPCION = db.RECEPCION.Find(id);

            if (rECEPCION == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CLIENTE = new SelectList(db.CLIENTES, "ID_CLIENTE", "NOMBRES", rECEPCION.CLIENTE);
            ViewBag.DESTINO = new SelectList(db.SUCURSAL, "ID_SUCURSAL", "NOMBRE", rECEPCION.DESTINO);
            return(View(rECEPCION));
        }