private void ObtenerJugadoresNroDoc() { var source = new AutoCompleteStringCollection(); SistemaARA.Negocio.Jugadores oJugadoresNegocio = new SistemaARA.Negocio.Jugadores(); SistemaARA.Entidades.Jugadores oJugadores = new SistemaARA.Entidades.Jugadores(); oJugadores = oJugadoresNegocio.GetAll(); foreach (SistemaARA.Entidades.Jugador oJugador in oJugadores) { source.Add(oJugador.nroDoc); } txbNroDocJugador.AutoCompleteCustomSource = source; }
private void txbNroDocJugador_TextChanged(object sender, EventArgs e) { SistemaARA.Negocio.Jugadores oJugadoresNegocio = new SistemaARA.Negocio.Jugadores(); SistemaARA.Entidades.Jugadores oJugadores = new SistemaARA.Entidades.Jugadores(); oJugadores = oJugadoresNegocio.GetOneNroDoc(txbNroDocJugador.Text); if (oJugadores.Count > 0) { txbNomApJugador.Text = oJugadores[0].apellido + ", " + oJugadores[0].nombre; } else { txbNomApJugador.Text = ""; } }
private void ObtenerJugadoresNombre() { var source = new AutoCompleteStringCollection(); SistemaARA.Negocio.Jugadores oJugadoresNegocio = new SistemaARA.Negocio.Jugadores(); SistemaARA.Entidades.Jugadores oJugadores = new SistemaARA.Entidades.Jugadores(); oJugadores = oJugadoresNegocio.GetAll(); foreach (SistemaARA.Entidades.Jugador oJugador in oJugadores) { source.Add(oJugador.apellido + ", " + oJugador.nombre); } txbNomApJugador.AutoCompleteCustomSource = source; }
private void txbNomApJugador_TextChanged(object sender, EventArgs e) { SistemaARA.Negocio.Jugadores oJugadoresNegocio = new SistemaARA.Negocio.Jugadores(); SistemaARA.Entidades.Jugadores oJugadores = new SistemaARA.Entidades.Jugadores(); oJugadores = oJugadoresNegocio.GetOne(txbNomApJugador.Text); if (oJugadores.Count > 0) { if (oJugadores[0].nroDoc.ToString() == ". .") { txbNroDocJugador.Text = "S/D"; } else { txbNroDocJugador.Text = oJugadores[0].nroDoc.ToString(); } } else { txbNroDocJugador.Text = ""; } }