public ActionResult Jugadores(string equipo, int year) { ServicioEquipos.SrvEquiposClient equipos = new ServicioEquipos.SrvEquiposClient(); List<Player> jugadores = equipos.GetJugadoresEquipoAño(equipo, year).ToList(); ViewBag.jugadores = jugadores; return PartialView("_ListaJugadores", jugadores); }
public ActionResult Jugador(string id) { ServicioEquipos.SrvEquiposClient cliente = new ServicioEquipos.SrvEquiposClient(); Player jugador = cliente.GetJugador(id); return PartialView("_Jugador", jugador); }
public ActionResult Asignar() { List <string> jugadoresOut = new List <string>(); List <string> jugadoresIn = new List <string>(); foreach (var key in HttpContext.Request.Params.AllKeys) { if (key.StartsWith("Out.") && HttpContext.Request.Params[key] != "false") { jugadoresOut.Add(key.Substring(4)); } } //TODO Servicio para borrar de la tabla da apariciones estos jugadores foreach (var key in HttpContext.Request.Params.AllKeys) { if (key.StartsWith("In.") && HttpContext.Request.Params[key] != "false") { jugadoresIn.Add(key.Substring(3)); } } //TODO Servicio para insertar en la tabla da apariciones estos jugadores al equipo año correspondientes Equipo eq = new Equipo() { teamID = "ARI", YearId = 2014 }; ServicioEquipos.SrvEquiposClient equipos = new ServicioEquipos.SrvEquiposClient(); ViewBag.JugadoresEquipo = equipos.GetJugadoresEquipoAño("ARI", 2014).ToList(); //ViewBag.JugadoresLibres = equipos.GetJugadoresLibresAño(2014).ToList(); return(View(eq)); }
// GET: api/Ejemplo public IEnumerable <Player> Get(string equipo, int year) { ServicioEquipos.SrvEquiposClient equipos = new ServicioEquipos.SrvEquiposClient(); List <Player> jugadores = equipos.GetJugadoresEquipoAño(equipo, year).ToList(); return(jugadores); }
public ActionResult Index(int year) { ViewBag.Year = year.ToString(); ServicioEquipos.SrvEquiposClient Equipos = new ServicioEquipos.SrvEquiposClient(); return View(Equipos.GetEquiposByYear(year)); }
public ActionResult Year(int id) { ViewBag.Year = id.ToString(); ServicioEquipos.SrvEquiposClient Equipos = new ServicioEquipos.SrvEquiposClient(); return View("Index",Equipos.GetEquiposByYear(id)); }
public ActionResult Year(string equipo, int year) { ServicioEquipos.SrvEquiposClient Equipos = new ServicioEquipos.SrvEquiposClient(); ViewBag.Players = Equipos.GetJugadoresEquipoAño(equipo, year); return(View("Index", Equipos.GetEquiposByYear(year))); }
public ActionResult Index(int year) { ViewBag.Year = year.ToString(); ServicioEquipos.SrvEquiposClient Equipos = new ServicioEquipos.SrvEquiposClient(); return(View(Equipos.GetEquiposByYear(year))); }
public ActionResult Modificar(string id, int year, string equipo) { ServicioEquipos.SrvEquiposClient servicio = new ServicioEquipos.SrvEquiposClient(); ViewBag.Year = year; ViewBag.Equipo = equipo; return(View(servicio.GetJugador(id))); }
public ActionResult Modificar(Player jugador) { HttpContext.Request.Params["year"].ToString(); ServicioEquipos.SrvEquiposClient servicio = new ServicioEquipos.SrvEquiposClient(); servicio.ModificarJugador(jugador); return(RedirectToAction("index", "Equipo")); }
public ActionResult Jugadores(string equipo, int year) { ServicioEquipos.SrvEquiposClient equipos = new ServicioEquipos.SrvEquiposClient(); List <Player> jugadores = equipos.GetJugadoresEquipoAño(equipo, year).ToList(); ViewBag.Year = year; ViewBag.IdEquipo = equipo; return(PartialView("ListaJugadores", jugadores)); }
public ActionResult Modificar(Player jugador,int year, string team) { //HttpContext.Request.Params ServicioEquipos.SrvEquiposClient cliente = new ServicioEquipos.SrvEquiposClient(); cliente.RellenarJugador(jugador); RouteValueDictionary routeData = new RouteValueDictionary(); routeData.Add("year", year); routeData.Add("team", team); ViewBag.error = true; //return RedirectToAction("Index", "Equipo",routeData); return View("JugadorForm",jugador); }
public ActionResult Asignar(int year, string equipo) { Equipo eq = new Equipo() { teamID = "ARI", YearId = 2014 }; ServicioEquipos.SrvEquiposClient equipos = new ServicioEquipos.SrvEquiposClient(); ViewBag.JugadoresEquipo = equipos.GetJugadoresEquipoAño("ARI", 2014).ToList(); //ViewBag.JugadoresLibres = equipos.GetJugadoresLibresAño(2014).ToList(); Cambio sin importancia return(View(eq)); }
private Equipo[] ObtenerEquipos(int year) { string clave = "Team" + year.ToString(); Equipo[] equipos = null; if (HttpContext.Cache[clave] == null) { ServicioEquipos.SrvEquiposClient Equipos = new ServicioEquipos.SrvEquiposClient(); equipos = Equipos.GetEquiposByYear(year); HttpContext.Cache.Insert(clave, equipos, null, DateTime.UtcNow.AddSeconds(5), System.Web.Caching.Cache.NoSlidingExpiration); } return((Equipo[])HttpContext.Cache[clave]); }
// GET: Equipo public ActionResult Index() { ViewBag.jugadores=null; int year = 2014; if(HttpContext.Request.Params["year"]==null) { ViewBag.Year = "2014"; } else { string team = HttpContext.Request.Params["team"]; year = Convert.ToInt32(HttpContext.Request.Params["year"]); ServicioEquipos.SrvEquiposClient Equiposs = new ServicioEquipos.SrvEquiposClient(); ViewBag.jugadores = Equiposs.GetJugadoresEquipoAño(team, year); ViewBag.Year = year; } ServicioEquipos.SrvEquiposClient Equipos = new ServicioEquipos.SrvEquiposClient(); return View(Equipos.GetEquiposByYear(year)); }
public ActionResult Modificar(string id, int year, string team) { ServicioEquipos.SrvEquiposClient cliente = new ServicioEquipos.SrvEquiposClient(); Player jugador = cliente.GetJugador(id); return View("JugadorForm", jugador); }
// GET: api/Ejemplo public IEnumerable<Player> Get(string equipo, int year) { ServicioEquipos.SrvEquiposClient equipos = new ServicioEquipos.SrvEquiposClient(); List<Player> jugadores = equipos.GetJugadoresEquipoAño(equipo, year).ToList(); return jugadores; }
public ActionResult UpDate(Player jugador) { ServicioEquipos.SrvEquiposClient cliente = new ServicioEquipos.SrvEquiposClient(); cliente.RellenarJugador(jugador); return View("Index"); }
// GET: Jugador public ActionResult Index(string id) { ServicioEquipos.SrvEquiposClient servicio = new ServicioEquipos.SrvEquiposClient(); return(View(servicio.GetJugador(id))); }