コード例 #1
0
        private void newLecturerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LecturerForm form = new LecturerForm();

            form.SetLecturer(new Lecturer());
            form.Show(this);

            form.FormClosed += LecturerForm_Closed;
        }
コード例 #2
0
        private void editLecturerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LecturerForm form  = new LecturerForm();
            int          index = LecturersGridView.CurrentCell.RowIndex;

            form.SetLecturer(new Lecturer()
            {
                Id   = (int)LecturersGridView["Id", index].Value,
                Name = LecturersGridView["Name", index].Value.ToString()
            });
            form.Show(this);

            form.FormClosed += LecturerForm_Closed;
        }