public void Consultar() { var _gestorDeportista = new GestorDeportista(); var documento = Global.documento; try { txtEstudios.Text = _gestorDeportista.Consultar(documento).Tables[0].Rows[0][0].ToString(); if (txtEstudios.Text == "Inscripto federado" || txtEstudios.Text == "Inscripto recreativas") { txtEstudios.Text = "Aprobado"; } if (txtEstudios.Text == "Creados") { txtEstudios.Text = "Por asignar"; lblAviso.Text = "Acercarse a la direccion de deportes para su asignacion"; } else { lblAviso.Text = ""; } //lblExiste.Text = ""; var id_estado = int.Parse(_gestorDeportista.Consultar(documento).Tables[0].Rows[0][1].ToString()); if (id_estado == 8 || id_estado == 9) { txtDocumento.Text = Global.documento + ""; txtUsuario.Text = Global.documento + ""; } else { txtDocumento.Text = Global.documento + ""; txtUsuario.Text = ""; } } catch (Exception ex) { //lblExiste.Text = "No Existe"; txtEstudios.Text = ""; txtUsuario.Text = ""; lblAviso.Text = ""; } }
protected void btnConsultar_Click(object sender, EventArgs e) { var gd = new GestorDeportista(); var documento = int.Parse(txtDocumento.Text); try { txtEstudios.Text = gd.Consultar(documento).Tables[0].Rows[0][0].ToString(); if (txtEstudios.Text == "inscripto federado" || txtEstudios.Text == "inscripto recreativas") { txtEstudios.Text = "Inscripto"; } if (txtEstudios.Text == "Creados") { txtEstudios.Text = "Por asignar"; lblAviso.Text = "Acercarse a la direccion de deportes para su asignacion"; } else { lblAviso.Text = ""; } //lblExiste.Text = ""; var id_estado = int.Parse(gd.Consultar(documento).Tables[0].Rows[0][1].ToString()); if (id_estado == 8 || id_estado == 9) txtUsuario.Text = txtDocumento.Text; else txtUsuario.Text = ""; } catch (Exception ex) { //lblExiste.Text = "No Existe"; txtEstudios.Text = ""; txtUsuario.Text = ""; lblAviso.Text = ""; } }
private void ConsultarDeportistas_Load(object sender, EventArgs e) { var gd = new GestorDeportista(); dgDeportistas.DataSource = gd.Consultar(); dgDeportistas.DataMember = "deportistas"; }