Esempio n. 1
0
        private void updateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var item    = lvwStudents.SelectedItems[0];
            var student = new StudentDto
            {
                Id       = int.Parse(item.SubItems[0].Text),
                Name     = item.SubItems[1].Text,
                LastName = item.SubItems[2].Text,
                Age      = int.Parse(item.SubItems[3].Text)
            };

            var studentForm = new frmStudent(studentService, this, student);

            studentForm.ShowDialog();
        }
Esempio n. 2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            var studentForm = new frmStudent(studentService, this);

            studentForm.ShowDialog();
        }