Exemplo n.º 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            tipo_evento tipo_evento = await db.tipo_evento.FindAsync(id);

            db.tipo_evento.Remove(tipo_evento);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Edit([Bind(Include = "id,tipo_evento1")] tipo_evento tipo_evento)
        {
            if (ModelState.IsValid)
            {
                db.Entry(tipo_evento).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(tipo_evento));
        }
Exemplo n.º 3
0
        public async Task <ActionResult> Create([Bind(Include = "id,tipo_evento1")] tipo_evento tipo_evento)
        {
            if (ModelState.IsValid)
            {
                db.tipo_evento.Add(tipo_evento);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(tipo_evento));
        }
Exemplo n.º 4
0
        // GET: tipo_evento/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tipo_evento tipo_evento = await db.tipo_evento.FindAsync(id);

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