Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            insumos insumos = db.insumos.Find(id);

            db.insumos.Remove(insumos);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "Id_insumos,codigo,nombre,descripcion")] insumos insumos)
 {
     if (ModelState.IsValid)
     {
         db.Entry(insumos).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(insumos));
 }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "Handle,Produto,Descricao,Quantidade,DataCompra")] insumos insumos)
 {
     if (ModelState.IsValid)
     {
         db.Entry(insumos).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(insumos));
 }
Exemple #4
0
        public ActionResult Create([Bind(Include = "Id_insumos,codigo,nombre,descripcion")] insumos insumos)
        {
            if (ModelState.IsValid)
            {
                db.insumos.Add(insumos);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(insumos));
        }
Exemple #5
0
        public ActionResult Create([Bind(Include = "Handle,Produto,Descricao,Quantidade,DataCompra")] insumos insumos)
        {
            if (ModelState.IsValid)
            {
                db.insumos.Add(insumos);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(insumos));
        }
Exemple #6
0
        // GET: insumos/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            insumos insumos = db.insumos.Find(id);

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