Esempio n. 1
0
 public void LoadData()
 {
     coursesTable.DataSource                     = CoacherController.GetCourses(member.AthleticId, CoacherCourseType.All);
     workedPlacesGridView.DataSource             = CoacherController.GetWorkedPlaces(member.AthleticId);
     internationalStudentDataGridView.DataSource = CoacherController.GetForignStudents(member.AthleticId, StudentSelectType.Under_Coacher);
     nationalStudentGridView.DataSource          = CoacherController.GetLocalStudents(member.AthleticId, StudentSelectType.Under_Coacher);
 }
Esempio n. 2
0
        private void deleteInternationalStudentBtn_Click(object sender, EventArgs e)
        {
            int selectedrowindex = internationalStudentDataGridView.SelectedCells[0].RowIndex;

            DataGridViewRow selectedRow = internationalStudentDataGridView.Rows[selectedrowindex];
            ForignStudent   fs          = new ForignStudent(Convert.ToString(selectedRow.Cells[0].Value), Convert.ToString(selectedRow.Cells[1].Value), Convert.ToString(selectedRow.Cells[2].Value), member.AthleticId);

            try
            {
                CoacherController.DeleteForignStudent(fs);
                internationalStudentDataGridView.DataSource = CoacherController.GetForignStudents(member.AthleticId, StudentSelectType.Under_Coacher);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }