private void button1_Click(object sender, EventArgs e) { this.Hide(); newPagamento np = new newPagamento(); np.Show(); }
private void button3_Click(object sender, EventArgs e) { int id = 0; try { id = (int)dataGridView1.CurrentRow.Cells[0].RowIndex; } catch { MessageBox.Show("Não existem itens para ser editados"); return; } if (id >= 0) { this.Hide(); newPagamento np = new newPagamento(id); np.Show(); } }