Ejemplo n.º 1
0
        private void 批次修改學年度學期ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ServiceDataRow           sdr = (ServiceDataRow)dataGridViewX1.CurrentRow.DataBoundItem;
            ChangeSchoolYearSemester ctf = new ChangeSchoolYearSemester("學年度/學期", sdr.SchoolYear, sdr.Semester);
            DialogResult             dr  = ctf.ShowDialog();

            if (dr == System.Windows.Forms.DialogResult.Yes)
            {
                foreach (DataGridViewRow row in dataGridViewX1.SelectedRows)
                {
                    sdr            = (ServiceDataRow)row.DataBoundItem;
                    sdr.SchoolYear = ctf.ChangeSchoolYear;
                    sdr.Semester   = ctf.ChangeSemester;
                }
            }
        }
        private void 批次修改學年度學期ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ServiceDataRow sdr = (ServiceDataRow)dataGridViewX1.CurrentRow.DataBoundItem;
            ChangeSchoolYearSemester ctf = new ChangeSchoolYearSemester("學年度/學期", sdr.SchoolYear, sdr.Semester);
            DialogResult dr = ctf.ShowDialog();

            if (dr == System.Windows.Forms.DialogResult.Yes)
            {
                foreach (DataGridViewRow row in dataGridViewX1.SelectedRows)
                {
                    sdr = (ServiceDataRow)row.DataBoundItem;
                    sdr.SchoolYear = ctf.ChangeSchoolYear;
                    sdr.Semester = ctf.ChangeSemester;
                }
            }
        }