//Condicion de checkBox private void chb_habilita_CheckedChanged(object sender, EventArgs e) { try { Factura non = new Factura(); if (chb_habilita.Checked) { llenarCotizacion(); eliminarCOlumndas(); cmb_cotizaciones.Enabled = true; cargardetalle(); non.Refresh(); } if (!chb_habilita.Checked) { eliminarCOlumndas(); dgv_facturaDetalle.DataSource = null; cmb_cotizaciones.Enabled = false; columnas(); txt_total.Text = ""; } } catch { MessageBox.Show("Error al abrir"); } }
//Condicion de checkBox public void chb_habilita_CheckedChanged(object sender, EventArgs e) { try { Factura non = new Factura(); if (chb_habilita.Checked) { ProductoControl.Enabled = false; controlCotizacion.Enabled = true; eliminarCOlumndas(); //llenarCotizacion(); cmb_cotizaciones.Enabled = true; //cargardetalle(); LLamado(); ClientesCotizacion(); btn_agregarProducto.Enabled = false; non.Refresh(); } if (!chb_habilita.Checked) { //cmb_cotizaciones.Items.Clear(); //ProductoControl.Enabled = true; eliminarCOlumndas(); LimpiarCliente(); dgv_facturaDetalle.DataSource = null; cmb_cotizaciones.Enabled = false; columnas(); txt_total.Text = ""; btn_agregarProducto.Enabled = true; } } catch { MessageBox.Show("Error al abrir"); } }