private void btnBuscar_Click(object sender, EventArgs e) { DataTable tablaParametro = NegocioParametro.consultarParametroTabla(this.txtNombreParametro.Text); if (tablaParametro.Rows.Count == 0) { desbloquearCampos(); } else { MessageBox.Show("Parámetro ya registrado", "Registrar Parámetro", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnBuscar_Click(object sender, EventArgs e) { NegocioParametro.consultarParametroTabla(this.txtNombreParametro.Text); if (this.tablaParametro.Rows.Count != 0) { this.txtNombreParametro.Text = Convert.ToString(this.tablaParametro.CurrentRow.Cells["NOMBREPARAMETRO"].Value); this.lblValorParametro.Text = Convert.ToString(this.tablaParametro.CurrentRow.Cells["VALOR"].Value); } else { this.limpiarCampos(); this.mostrarParametros(); MessageBox.Show("Parámetro no registrado", "Consultar Parámetro", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void consultarParametroTabla() { this.tablaParametro.DataSource = NegocioParametro.consultarParametroTabla(this.txtNombreParametro.Text); }
private void mostrarIVA() { this.tablaIva.DataSource = NegocioParametro.consultarParametroTabla("IVA"); }