private void dgvMaterial_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (txtFlag.Text == "1") { FrmProducto frmProd = FrmProducto.GetInscance(); if (dgvMaterial.CurrentRow != null) { frmProd.SetMaterial(dgvMaterial.CurrentRow.Cells[1].Value.ToString(), dgvMaterial.CurrentRow.Cells[2].Value.ToString(), dgvMaterial.CurrentRow.Cells[3].Value.ToString().Trim()); frmProd.Show(); Close(); } } //if (txtFlag.Text == "2") //{ // FrmInvetario frmProd = FrmInvetario.GetInscance(); // if (dgvMaterial.CurrentRow != null) // { // string unidad = dgvMaterial.CurrentRow.Cells[3].Value.ToString(); // unidad.Trim(); // frmProd.SetMaterial(dgvMaterial.CurrentRow.Cells[1].Value.ToString(), // dgvMaterial.CurrentRow.Cells[2].Value.ToString(), unidad); // frmProd.Show(); // Close(); // } //} }
private void dgvCategoria_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (txtFlag.Text == "1") { FrmProducto frmProd = FrmProducto.GetInscance(); if (dgvCategoria.CurrentRow != null) { frmProd.SetCategoria(dgvCategoria.CurrentRow.Cells[1].Value.ToString(), dgvCategoria.CurrentRow.Cells[2].Value.ToString()); frmProd.Show(); Close(); } } }