private void frmUsuariosManter_Load(object sender, EventArgs e) { if (this.comando.Equals("editar")) { Modelo.Controle controle = new Modelo.Controle(); controle.GetEditarUsuario(this.idUsuario); while (controle.Dr.Read()) { txbID.Text = this.idUsuario.ToString(); txbLogin.Text = controle.Dr.GetValue(0).ToString(); txbSenha.Text = controle.Dr.GetValue(1).ToString(); txbRA.Text = controle.Dr.GetValue(2).ToString(); txbRegistro.Text = controle.Dr.GetValue(3).ToString(); txbCurso.Text = controle.Dr.GetValue(4).ToString(); cmbTipo.Text = controle.Dr.GetValue(5).ToString(); cmbEstado.Text = controle.Dr.GetValue(6).ToString(); } } else { cmbEstado.SelectedIndex = 0; } }