private void Add_Click(object sender, EventArgs e) { TransactionForm transForm = new TransactionForm(); transForm.MdiParent = this.ParentForm; transForm.Show(); }
private void Edit_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in this.dataGridView1.SelectedRows) { Transaction trans = row.DataBoundItem as Transaction; if (trans != null) { TransactionForm transForm = new TransactionForm(trans); transForm.MdiParent = this.ParentForm; transForm.Show(); } } }