Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FormadePago formadepago = db.FormadePagoes.Find(id);

            db.FormadePagoes.Remove(formadepago);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "PagoId,Nombre,Indice")] FormadePago formadepago)
 {
     if (ModelState.IsValid)
     {
         db.Entry(formadepago).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(formadepago));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "PagoId,Nombre,Indice")] FormadePago formadepago)
        {
            if (ModelState.IsValid)
            {
                db.FormadePagoes.Add(formadepago);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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