private void button1_Click(object sender, EventArgs e) { ModalProducto modPro = new ModalProducto(); modPro.button2.Enabled = false; modPro.button3.Enabled = false; modPro.ShowDialog(); llenarDataGrid("no"); }
private void button2_Click(object sender, EventArgs e) { if (dataGridViewProducto.SelectedRows.Count == 0) { MessageBox.Show("Debe selecionar un producto"); return; } ModalProducto modPro = new ModalProducto(); modPro.button1.Enabled = false; modPro.idPro = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[0].Value.ToString(); modPro.txt_codigo.Text = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[1].Value.ToString(); modPro.txt_nombre.Text = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[2].Value.ToString(); modPro.txt_cantidad.Text = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[3].Value.ToString(); modPro.txt_itbis.Text = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[4].Value.ToString(); modPro.txt_estanteria.Text = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[5].Value.ToString(); modPro.txt_precio.Text = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[6].Value.ToString(); modPro.comboTipoVenta.Text = dataGridViewProducto.Rows[dataGridViewProducto.CurrentCell.RowIndex].Cells[7].Value.ToString(); modPro.ShowDialog(); llenarDataGrid("no"); }