public ActionResult DeleteConfirmed(int id)
        {
            TipoPagaduria tipoPagaduria = db.TipoPagaduria.Find(id);

            db.TipoPagaduria.Remove(tipoPagaduria);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "tpa_id,tpa_descripcion")] TipoPagaduria tipoPagaduria)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tipoPagaduria).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tipoPagaduria));
 }
        // GET: TipoPagadurias/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TipoPagaduria tipoPagaduria = db.TipoPagaduria.Find(id);

            if (tipoPagaduria == null)
            {
                return(HttpNotFound());
            }
            return(View(tipoPagaduria));
        }
        public ActionResult Create([Bind(Include = "tpa_id,tpa_descripcion")] TipoPagaduria tipoPagaduria)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    db.TipoPagaduria.Add(tipoPagaduria);
                    db.SaveChanges();
                    return(RedirectToAction("Index"));
                }
                catch (Exception Ex)
                {
                    ViewBag.Err = "Error al tratar de guardar el Registro " + Ex.Message;
                }
            }

            return(View(tipoPagaduria));
        }