Пример #1
0
        public ActionResult DeleteConfirmed(sbyte?id)
        {
            tipo_evento tipo_evento = db.tipo_evento.Find(id);

            db.tipo_evento.Remove(tipo_evento);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "cd_tipo_evento,tx_tipo_evento")] tipo_evento tipo_evento)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tipo_evento).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tipo_evento));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "tx_tipo_evento")] tipo_evento tipo_evento)
        {
            if (ModelState.IsValid)
            {
                db.tipo_evento.Add(tipo_evento);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tipo_evento));
        }
Пример #4
0
        // GET: tipo_evento/Edit/5
        public ActionResult Edit(sbyte?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tipo_evento tipo_evento = db.tipo_evento.Find(id);

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