private void BtnNuevo_Click(object sender, EventArgs e) { Registrar_Planta registrar = new Registrar_Planta(); AddOwnedForm(registrar); registrar.Show(); this.Enabled = false; }
private void DgvPlanta_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Registrar_Planta registrar = new Registrar_Planta(); AddOwnedForm(registrar); registrar.Show(); this.Enabled = false; registrar.txtCodigo.Text = dgvPlanta.CurrentRow.Cells[0].Value.ToString(); registrar.txtDesc.Text = dgvPlanta.CurrentRow.Cells[1].Value.ToString(); registrar.txtPrecio.Text = dgvPlanta.CurrentRow.Cells[3].Value.ToString(); registrar.txtStock.Text = dgvPlanta.CurrentRow.Cells[4].Value.ToString(); registrar.cboTipo.SelectedValue = conexion.ValorMiembro(dgvPlanta.CurrentRow.Cells[2].Value.ToString()); registrar.actualizar = true; registrar.txtCodigo.Enabled = false; }