private void dgGeneral_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { try{ index = dgGeneral.CurrentRow.Index; frmInsert = new FrmInsertar(dgGeneral[0, index].Value.ToString(), dgGeneral[1, index].Value.ToString(), dgGeneral[2, index].Value.ToString(), tpGeneales.Text); frmInsert.ShowDialog(); generales(); } catch (NullReferenceException ex) { MessageBox.Show("No hay datos en esta tabla " + ex.Message); } }
private void dgAlmacen_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { try { index = dgAlmacen.CurrentRow.Index; frmInsert = new FrmInsertar(Int32.Parse(dgAlmacen[0, index].Value.ToString()), dgAlmacen[1, index].Value.ToString(), dgAlmacen[2, index].Value.ToString(), tpAlmacen.Text); frmInsert.ShowDialog(); almacenes(); } catch (NullReferenceException ex) { MessageBox.Show("No hay datos en esta tabla " + ex.Message); } }