private void btnEntra_Click(object sender, EventArgs e) { if ((txtAdm.Text == String.Empty)) { MessageBox.Show("Campo vazio, preencha.", "Aviso!", MessageBoxButtons.OK, MessageBoxIcon.Information); txtAdm.Clear(); } if (txtAdm.Text != "") { clnUrna ObjClnUrna = new clnUrna(); ObjClnUrna.Adm = (txtAdm.Text.Trim()); OracleDataReader ObjDrDados; ObjDrDados = ObjClnUrna.Valida_ADM(); try{ if (ObjDrDados.Read()) { //MessageBox.Show("Acesso Liberado."); Form FrmGerencia = new FrmGerencia(); FrmGerencia.ShowDialog(); txtAdm.Clear(); txtMesario.Clear(); txtSenha.Clear(); txtAdm.Focus(); } else { MessageBox.Show("Identificação do Administrador incorreta.", "Aviso!", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception error) { error.ToString(); } txtAdm.Clear(); txtMesario.Clear(); txtSenha.Clear(); txtAdm.Focus(); } }