private void addNewToolStripMenuItem_Click(object sender, EventArgs e) { AddUpdateGivingTypeFrm form = new AddUpdateGivingTypeFrm(false); form.FormClosing += new FormClosingEventHandler(this.GivingTypeUpdated); form.ShowDialog(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (givingTypesDataGridView.Rows.Count == 0) { return; } int id = Convert.ToInt32(givingTypesDataGridView.SelectedRows[0].Cells["givingTypeId"].Value); GivingTypesController givingTypesController = new GivingTypesController(); GivingType givingType = givingTypesController.Show(id); AddUpdateGivingTypeFrm editGivingType = new AddUpdateGivingTypeFrm(true, givingType); editGivingType.FormClosing += new FormClosingEventHandler(this.GivingTypeUpdated); editGivingType.ShowDialog(); }