private void addBtn_Click(object sender, EventArgs e) { EditEquipmentForm form = new EditEquipmentForm("新增", dicUnit[cbxUnit.Text], ""); form.Text = "新增設備"; form.FormClosed += delegate { ReloadDataGridView(dicUnit[cbxUnit.Text]); }; form.ShowDialog(); }
private void updateBtn_Click(object sender, EventArgs e) { string equipID = "" + dataGridViewX1.SelectedRows[0].Tag; EditEquipmentForm form = new EditEquipmentForm("修改", dicUnit[cbxUnit.Text], equipID); form.Text = "修改設備"; form.FormClosed += delegate { ReloadDataGridView(dicUnit[cbxUnit.Text]); }; form.ShowDialog(); }