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

            db.EVENTO.Remove(eVENTO);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "ID,NOMBRE,FECHA,HORA")] EVENTO eVENTO)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eVENTO).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(eVENTO));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "ID,NOMBRE,FECHA,HORA")] EVENTO eVENTO)
        {
            if (ModelState.IsValid)
            {
                db.EVENTO.Add(eVENTO);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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