Esempio n. 1
0
 public void InitializeCourseData()
 {
     userId = _pmodel.GetCurrentUser();
     _studentAlreadySelectedCourse = _pmodel.getStudentSelectedCourse(userId);
     for (int i = 0; i < _studentAlreadySelectedCourse.Count; i++)
     {
         _studentSelectCId.Add(_pmodel.getCourseIdByFlowCourseId(_studentAlreadySelectedCourse[i]));
         _studentSelectCName.Add(_pmodel.getCourseNameByFlowCourseId(_studentAlreadySelectedCourse[i]));
     }
 }
        private void ClickCheckScheduleButton(object sender, EventArgs e)
        {
            if (_courseList != null)
            {
                _courseList.Clear();
            }
            _courseList = _pmodel.getStudentSelectedCourse(_idTextBox.Text);

            RefreshClassSchedule();
        }
 public void initializeCourseData()
 {
     _studentAlreadySelectedCourse = _pmodel.getStudentSelectedCourse(userId);
     _professorCourseList          = _pmodel.GetCourseList();
     foreach (DataRow dr in _professorCourseList.Rows)
     {
         int flag = 0;
         for (int i = 0; i < _studentAlreadySelectedCourse.Count; i++)
         {
             if (_studentAlreadySelectedCourse[i] == int.Parse(dr[2].ToString()))
             {
                 flag = 1;
             }
         }
         if (flag != 1)
         {
             _pIdList.Add(dr[1].ToString());
             _cIdList.Add(_pmodel.getCourseIdByFlowCourseId(int.Parse(dr[2].ToString())));
             _cNameList.Add(_pmodel.getCourseNameByFlowCourseId(int.Parse(dr[2].ToString())));
         }
     }
 }