private void AddButton_Click(object sender, EventArgs e) { AddorEdit Add = new AddorEdit(); Add.FormClosing += new FormClosingEventHandler(this.AddorEdit_FormClosing); Add.Show(); }
private void EditButton_Click(object sender, EventArgs e) { List <int> IDList = SelectRows(); foreach (int i in IDList) { AddorEdit Edit = new AddorEdit(i); Edit.FormClosing += new FormClosingEventHandler(this.AddorEdit_FormClosing); Edit.Show(); } }