예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            INT_Venta iNT_Venta = db.INT_Venta.Find(id);

            db.INT_Venta.Remove(iNT_Venta);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "ventId,ventNombre,ventCodigo,ventFamilia,ventPrecio,ventDescuento,ventDescripcion")] INT_Venta iNT_Venta)
 {
     if (ModelState.IsValid)
     {
         db.Entry(iNT_Venta).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(iNT_Venta));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "ventId,ventNombre,ventCodigo,ventFamilia,ventPrecio,ventDescuento,ventDescripcion")] INT_Venta iNT_Venta)
        {
            if (ModelState.IsValid)
            {
                db.INT_Venta.Add(iNT_Venta);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(iNT_Venta));
        }
예제 #4
0
        // GET: INT_Venta/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            INT_Venta iNT_Venta = db.INT_Venta.Find(id);

            if (iNT_Venta == null)
            {
                return(HttpNotFound());
            }
            return(View(iNT_Venta));
        }