public ActionResult Edit([Bind(Include = "idevento,nombre,fecha_inicio,fecha_final,organizador,idcategoria")] Evento evento) { if (ModelState.IsValid) { EventoBLL.Update(evento); return(RedirectToAction("Index")); } ViewBag.idcategoria = new SelectList(CategoriaBLL.List(), "idcategoria", "nombre", evento.idcategoria); return(View(evento)); }
public IHttpActionResult Put(Evento Evento) { try { EventoBLL.Update(Evento); return(Content(HttpStatusCode.OK, "Evento actualizado correctamente")); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public static Evento ActualizarEvento(string nombre, string categoria, string descripcion, string fechaInicio, string fechaFin, string cantidadGrupos, string cantidadEquipos, string jugadoresPorEquipo, string id) { EventoBLL.Update(nombre, categoria, descripcion, Convert.ToDateTime(fechaInicio), Convert.ToDateTime(fechaFin), Convert.ToInt32(cantidadEquipos), Convert.ToInt32(cantidadGrupos), Convert.ToInt32(jugadoresPorEquipo), Convert.ToInt32(id)); Evento objEvento = EventoBLL.SelectById(Convert.ToInt32(id)); return(objEvento); }
public ActionResult Edit(tblEvento evento) { var eveBLL = new EventoBLL(); ActionResult Result = null; try { if (ModelState.IsValid) { eveBLL.Update(evento); Result = RedirectToAction("Index"); } } catch { return(View()); } return(Result); }