Пример #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]));
     }
 }
 public void InitializeCourseData()
 {
     userId      = _pmodel.GetCurrentUser();
     _courseList = _pmodel.GetProfessorOfferCourse(userId);
     for (int i = 0; i < _courseList.Count; i++)
     {
         _cIdList.Add(_pmodel.getCourseIdByFlowCourseId(_courseList[i]));
         _cNameList.Add(_pmodel.getCourseNameByFlowCourseId(_courseList[i]));
     }
     SortCourseList(_cIdList, _cNameList);
 }
Пример #3
0
 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())));
         }
     }
 }