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

            db.FormasPagmtos.Remove(formasPagmtos);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "FormaPagmtoID,Descricao")] FormasPagmtos formasPagmtos)
 {
     if (ModelState.IsValid)
     {
         db.Entry(formasPagmtos).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(formasPagmtos));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "FormaPagmtoID,Descricao")] FormasPagmtos formasPagmtos)
        {
            if (ModelState.IsValid)
            {
                db.FormasPagmtos.Add(formasPagmtos);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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