private void button1_Click(object sender, EventArgs e) { try { if (verificaCampos()) { usuario u = new usuario { user = txt_user.Text, senha = txt_senha.Text, tipo = cb_tipo.Text }; usuarioDAO udao = new usuarioDAO(); udao.cadastra(u); uc_usuarios_Load(null, null); } } catch (Exception) { MessageBox.Show("Erro ao cadastrar"); } }