private void btnConsulta_Click(object sender, EventArgs e) { try { if (!ValidarSeleccion()) { return; } ConexionSQLite SQLite = new ConexionSQLite(); if (!SQLite.LlenarGrilla(this.dgvDatos, this.tvTablas.SelectedNode.Text)) { MessageBox.Show("Error: " + SQLite.Error, "AVISO", MessageBoxButtons.OK, MessageBoxIcon.Error); SQLite = null; return; } } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message, "AVISO", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }