コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ConceptoDePago conceptoDePago = db.ConceptoDePagos.Find(id);

            db.ConceptoDePagos.Remove(conceptoDePago);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "conceptoId,descripcion,estado")] ConceptoDePago conceptoDePago)
 {
     if (ModelState.IsValid)
     {
         db.Entry(conceptoDePago).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(conceptoDePago));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "conceptoId,descripcion,estado")] ConceptoDePago conceptoDePago)
        {
            if (ModelState.IsValid)
            {
                db.ConceptoDePagos.Add(conceptoDePago);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(conceptoDePago));
        }
コード例 #4
0
        // GET: ConceptoDePagoes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ConceptoDePago conceptoDePago = db.ConceptoDePagos.Find(id);

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