Beispiel #1
0
        private void BtnNuevo_Click(object sender, EventArgs e)
        {
            Registrar_Planta registrar = new Registrar_Planta();

            AddOwnedForm(registrar);
            registrar.Show();
            this.Enabled = false;
        }
Beispiel #2
0
        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;
        }