private void 批次修改所有資料toolStripMenuItem1_Click(object sender, EventArgs e) { ServiceDataRow sdr = (ServiceDataRow)dataGridViewX1.CurrentRow.DataBoundItem; ChangeAllDataForm ctf = new ChangeAllDataForm("所有", sdr._slr); DialogResult dr = ctf.ShowDialog(); if (dr == System.Windows.Forms.DialogResult.Yes) { foreach (DataGridViewRow row in dataGridViewX1.SelectedRows) { sdr = (ServiceDataRow)row.DataBoundItem; sdr.SchoolYear = ctf.學年度; sdr.Semester = ctf.學期; sdr.OccurDate = ctf.日期; sdr.Reason = ctf.事由; sdr.Hours = ctf.時數; sdr.Organizers = ctf.主辦單位; sdr.Remark = ctf.備註; } } }
private void 批次修改所有資料toolStripMenuItem1_Click(object sender, EventArgs e) { ServiceDataRow sdr = (ServiceDataRow)dataGridViewX1.CurrentRow.DataBoundItem; ChangeAllDataForm ctf = new ChangeAllDataForm("所有", sdr._slr); DialogResult dr = ctf.ShowDialog(); if (dr == System.Windows.Forms.DialogResult.Yes) { foreach (DataGridViewRow row in dataGridViewX1.SelectedRows) { sdr = (ServiceDataRow)row.DataBoundItem; sdr.SchoolYear = ctf.學年度; sdr.Semester = ctf.學期; sdr.OccurDate = ctf.日期; sdr.Reason = ctf.事由; sdr.Hours = ctf.時數; sdr.Organizers = ctf.主辦單位; sdr.Remark = ctf.備註; } } }