예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbl_Evento tbl_Evento = db.tbl_Evento.Find(id);

            db.tbl_Evento.Remove(tbl_Evento);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "id,Nombre,Fecha,Activo")] tbl_Evento tbl_Evento)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Evento).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_Evento));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "id,Nombre,Fecha,Activo")] tbl_Evento tbl_Evento)
        {
            if (ModelState.IsValid)
            {
                db.tbl_Evento.Add(tbl_Evento);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_Evento));
        }
예제 #4
0
        // GET: Evento/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_Evento tbl_Evento = db.tbl_Evento.Find(id);

            if (tbl_Evento == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_Evento));
        }
예제 #5
0
        // GET: Evento/Edit/5
        public ActionResult AgregarPadron(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_Evento tbl_Evento = db.tbl_Evento.Find(id);

            if (tbl_Evento == null)
            {
                return(HttpNotFound());
            }
            //return RedirectToAction("Create", new RouteValueDictionary(
            //  new { controller = PatronAsociado, action = "Main", Id = Id }));
            return(View());
        }