예제 #1
0
        private void deleteWorkedPlacesBtn_Click(object sender, EventArgs e)
        {
            int selectedrowindex = workedPlacesGridView.SelectedCells[0].RowIndex;

            DataGridViewRow selectedRow = workedPlacesGridView.Rows[selectedrowindex];
            WorkedPlace     wp;

            try
            {
                wp = new WorkedPlace(Convert.ToString(selectedRow.Cells[0].Value), Convert.ToString(selectedRow.Cells[1].Value), Convert.ToString(selectedRow.Cells[2].Value), Convert.ToString(selectedRow.Cells[3].Value));
            }
            catch
            {
                return;
            }
            try
            {
                CoacherController.DeleteWorkedPlace(wp);
                workedPlacesGridView.DataSource = CoacherController.GetWorkedPlaces(member.AthleticId);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #2
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);
 }