コード例 #1
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            FormSchoolEdit FormSE = new FormSchoolEdit();

            FormSE.SchoolCur = new School();
            FormSE.IsNew     = true;
            FormSE.ShowDialog();
            if (FormSE.DialogResult != DialogResult.OK)
            {
                return;
            }
            FillList();
        }
コード例 #2
0
        private void listSchools_DoubleClick(object sender, System.EventArgs e)
        {
            if (listSchools.SelectedIndex == -1)
            {
                return;
            }
            FormSchoolEdit FormSE = new FormSchoolEdit();

            FormSE.SchoolCur = Schools.List[listSchools.SelectedIndex];
            FormSE.ShowDialog();
            if (FormSE.DialogResult != DialogResult.OK)
            {
                return;
            }
            FillList();
        }