Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Aros aros = db.Aros.Find(id);

            aros.Ativo = (OpcaoStatusAros)1;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Medida,Ativo")] Aros aros)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aros).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aros));
 }
Exemplo n.º 3
0
 public ActionResult Create([Bind(Include = "Id,Medida,Ativo")] Aros aros)
 {
     if (ModelState.IsValid)
     {
         db.Aros.Add(aros);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aros));
 }
Exemplo n.º 4
0
        // GET: Aros/Delete
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Aros aros = db.Aros.Find(id);

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