Beispiel #1
0
        public ActionResult Erase(int id)
        {
            IcmsFrete icmsFrete = db.IcmsFretes.Find(id);

            db.IcmsFretes.Remove(icmsFrete);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,Rotulo,Icms,Frete")] IcmsFrete icmsFrete)
 {
     if (ModelState.IsValid)
     {
         db.Entry(icmsFrete).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(icmsFrete));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Id,Rotulo,Icms,Frete")] IcmsFrete icmsFrete)
        {
            if (ModelState.IsValid)
            {
                db.IcmsFretes.Add(icmsFrete);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(icmsFrete));
        }
Beispiel #4
0
        // GET: IcmsFretes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IcmsFrete icmsFrete = db.IcmsFretes.Find(id);

            if (icmsFrete == null)
            {
                return(HttpNotFound());
            }
            return(View(icmsFrete));
        }
Beispiel #5
0
        public ActionResult DeleteConfirmed(int id)
        {
            IcmsFrete icmsFrete = db.IcmsFretes.Find(id);

            return(View("Erase", icmsFrete));
        }