Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TablaP tablap = db.TablaPs.Find(id);

            db.TablaPs.Remove(tablap);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "id,Periodo,TablaP1,TablaP2,TablaP3,TablaP4,TablaP5,TablaP6,TablaP7,TablaP8,TablaP9,TablaP10")] TablaP tablap)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tablap).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tablap));
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "id,Periodo,TablaP1,TablaP2,TablaP3,TablaP4,TablaP5,TablaP6,TablaP7,TablaP8,TablaP9,TablaP10")] TablaP tablap)
        {
            if (ModelState.IsValid)
            {
                db.TablaPs.Add(tablap);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tablap));
        }
Ejemplo n.º 4
0
        // GET: /TablaP/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TablaP tablap = db.TablaPs.Find(id);

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