public SelectedCourse(presentationModel pmodel) { _pmodel = pmodel; InitializeComponent(); userId = _pmodel.GetCurrentUser(); _showStudentNameLabel.Text = _pmodel.GetCurrentUser(); initializeCourseData(); RefreshSelectCourseGridView(); RefreshStudentSelectCourseGridView(); _studentSelectCourseDataGridView.Columns[4].Visible = false; }
/// <summary> /// 確認新增課程 /// </summary> private void ClickOKButton(object sender, EventArgs e) { string userId = _pmodel.GetCurrentUser(); _pmodel.OfferCourse(_tempDateList, _tempTimeList, _courseNameTextBox.Text.ToString(), _courseIdTextBox.Text, userId); this.DialogResult = DialogResult.OK; }
public ReviewSelectedCourse(presentationModel pmodel) { _pmodel = pmodel; InitializeComponent(); InitializeCourseData(); RefreshCourseListGridView(); _userNameLabel.Text = _pmodel.GetCurrentUser(); }
public DropCourse(presentationModel pmodel) { _pmodel = pmodel; InitializeComponent(); InitializeCourseData(); InitializeDropCourseDataGridView(); RefreshCourseDataGridView(); _showUserLabel.Text = _pmodel.GetCurrentUser(); }
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); }