Ejemplo n.º 1
0
        private void btnAddParent_Click(object sender, EventArgs e)
        {
            int selectedRow = dataGridStudents.CurrentCell.RowIndex;
            int studentID = int.Parse(
                dataGridStudents.Rows[selectedRow].Cells[0].Value.ToString());

            AddNewParentWindow wnd = new AddNewParentWindow(studentID);
            wnd.FormClosed += (o, s) =>
                {
                    parentsListDataGridView.DataSource = StudentDAL.GetStudentParents(studentID);
                };
            wnd.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btnAddParent_Click(object sender, EventArgs e)
        {
            int selectedRow = dataGridStudents.CurrentCell.RowIndex;
            int studentID   = int.Parse(
                dataGridStudents.Rows[selectedRow].Cells[0].Value.ToString());

            AddNewParentWindow wnd = new AddNewParentWindow(studentID);

            wnd.FormClosed += (o, s) =>
            {
                parentsListDataGridView.DataSource = StudentDAL.GetStudentParents(studentID);
            };
            wnd.ShowDialog();
        }