}//---------------------------- //#########################################END COMBOX cboSemester EVENTS########################################################### //#########################################BUTTON btnSearchCourse EVENTS########################################################### //event is raised when the control is clicked private void btnSearchCourseClick(object sender, EventArgs e) { try { using (SearchOnTextBoxListCourse frmSearch = new SearchOnTextBoxListCourse(_userInfo, _studentManager, _couseGroupId)) { frmSearch.AdoptGridSize = true; frmSearch.ShowDialog(this); if (frmSearch.HasSelected) { CommonExchange.CourseInformation courseInfo = _studentManager.GetSelectedCourse(frmSearch.PrimaryId); _enrolmentCourseInfo.CourseInfo.CourseId = courseInfo.CourseId; this.lblSysIdCourse.Text = _enrolmentCourseInfo.CourseInfo.CourseId; this.lblCourseTitle.Text = courseInfo.CourseTitle; this.lblDepartmentName.Text = _studentManager.GetCourseDepartmentName(courseInfo.CourseId); } } } catch (Exception ex) { MessageBox.Show("Error loading search course module. \n\n" + ex.Message, "Error Loading", MessageBoxButtons.OK, MessageBoxIcon.Error); } }//----------------------------
public StudentEntryLevelUpdate(CommonExchange.SysAccess userInfo, CommonExchange.StudentEnrolmentLevel enrolmentLevelInfo, CommonExchange.StudentEnrolmentCourse enrolmentCourseInfo, StudentLogic studentManager) { this.InitializeComponent(); _userInfo = userInfo; _studentManager = studentManager; _enrolmentCourseInfo = enrolmentCourseInfo; _enrolmentLevelInfo = enrolmentLevelInfo; _enrolmentLevelInfoTemp = (CommonExchange.StudentEnrolmentLevel)enrolmentLevelInfo.Clone(); CommonExchange.CourseInformation courseInfo = _studentManager.GetSelectedCourse(_enrolmentCourseInfo.CourseInfo.CourseId); this.lblSysIdCourse.Text = courseInfo.CourseId; this.lblCourseTitle.Text = courseInfo.CourseTitle; this.lblDepartmentName.Text = _studentManager.GetCourseDepartmentName(courseInfo.CourseId); String semester = String.IsNullOrEmpty(_studentManager.GetSemesterDescription(_enrolmentCourseInfo.SemesterInfo.SemesterSysId)) ? String.Empty : _studentManager.GetSemesterDescription(_enrolmentCourseInfo.SemesterInfo.SemesterSysId) + " "; this.lblSchoolYearSemester.Text = semester + _studentManager.GetYearDescriptionByFeeInformationSystemId(_enrolmentCourseInfo.SchoolFeeInfo.FeeInformationSysId); this.lblSysID.Text = _enrolmentLevelInfo.EnrolmentLevelSysId; this.chkIsEntryLevel.Checked = _enrolmentLevelInfo.IsEntryLevel; this.chkIsEntryLevel.Enabled = false; _studentManager.InitializeSchoolYearComboLevelUpdate(this.cboYear, _studentManager.GetYearIdByEnrolmentLevelSysId(_enrolmentLevelInfo.EnrolmentLevelSysId)); if (_studentManager.IsSemestralByCourse(_enrolmentCourseInfo.CourseInfo.CourseId)) { _studentManager.InitializeSemesterComboUpdateLevel(this.cboSemester, _enrolmentLevelInfo.SemesterInfo.SemesterSysId); _dateStart = _studentManager.GetSemesterDateStart(_enrolmentLevelInfo.SemesterInfo.SemesterSysId); _dateEnd = _studentManager.GetSemesterDateEnd(_enrolmentLevelInfo.SemesterInfo.SemesterSysId); } else { _dateStart = _studentManager.GetSchoolYearDateStart(_studentManager.GetYearIdByEnrolmentLevelSysId(_enrolmentLevelInfo.EnrolmentLevelSysId)); _dateEnd = _studentManager.GetSchoolYearDateEnd(_studentManager.GetYearIdByEnrolmentLevelSysId(_enrolmentLevelInfo.EnrolmentLevelSysId)); } _studentManager.InitializeYearLevelComboUpdate(this.cboYearLevel, _enrolmentLevelInfo.EnrolmentLevelSysId); this.SetRecordLocked(); this.cboSemester.Enabled = _studentManager.IsSemestralByCourse(courseInfo.CourseId) ? true : false; this.FormClosing += new FormClosingEventHandler(ClassClosing); this.btnClose.Click += new EventHandler(btnCloseClick); this.btnDelete.Click += new EventHandler(btnDeleteClick); }
public CourseUpdate(CommonExchange.SysAccess userInfo, CommonExchange.CourseInformation courseInfo, CourseLogic courseManager) { this.InitializeComponent(); _userInfo = userInfo; _courseInfo = courseInfo; _courseInfoTemp = (CommonExchange.CourseInformation)courseInfo.Clone(); _courseManager = courseManager; this.FormClosing += new FormClosingEventHandler(ClassClosing); this.btnClose.Click += new EventHandler(btnCloseClick); this.btnUpdate.Click += new EventHandler(btnUpdateClick); }
} //-------------------------------- //this function returns a course information details public CommonExchange.CourseInformation GetDetailsCourseInformation(String courseSysId) { CommonExchange.CourseInformation courseInfo = new CommonExchange.CourseInformation(); if (_courseTable != null) { String strFilter = "course_id = '" + courseSysId + "'"; DataRow[] selectRow = _courseTable.Select(strFilter, "course_id ASC"); foreach (DataRow courseRow in selectRow) { courseInfo.CourseId = RemoteServerLib.ProcStatic.DataRowConvert(courseRow, "course_id", ""); courseInfo.CourseTitle = RemoteServerLib.ProcStatic.DataRowConvert(courseRow, "course_title", ""); courseInfo.Acronym = RemoteServerLib.ProcStatic.DataRowConvert(courseRow, "course_acronym", ""); } } return(courseInfo); } //-------------------------------------
//#########################################CLASS StudentEntryLevel EVENTS########################################################### //event is raised when the class is loaded protected virtual void ClassLoad(object sender, EventArgs e) { _studentManager.InitializeSchoolYearComboLevelCreate(this.cboYear, _studentManager.GetSchoolYearDateStart(_studentManager.GetYearIdBySysIdSchoolFee(_enrolmentCourseInfo.SchoolFeeInfo.FeeInformationSysId))); //_studentManager.InitializeYearLevelCombo(this.cboYearLevel, _enrolmentCourseInfo.CourseInfo.CourseId); CommonExchange.CourseInformation courseInfo = _studentManager.GetSelectedCourse(_enrolmentCourseInfo.CourseInfo.CourseId); this.lblSysIdCourse.Text = courseInfo.CourseId; this.lblCourseTitle.Text = courseInfo.CourseTitle; this.lblDepartmentName.Text = _studentManager.GetCourseDepartmentName(courseInfo.CourseId); String semester = String.IsNullOrEmpty(_studentManager.GetSemesterDescription(_enrolmentCourseInfo.SemesterInfo.SemesterSysId)) ? String.Empty : _studentManager.GetSemesterDescription(_enrolmentCourseInfo.SemesterInfo.SemesterSysId) + " "; this.lblSchoolYearSemester.Text = semester + _studentManager.GetYearDescriptionByFeeInformationSystemId(_enrolmentCourseInfo.SchoolFeeInfo.FeeInformationSysId); this.chkIsEntryLevel.Enabled = false; this.chkIsEntryLevel.Checked = _enrolmentLevelInfo.IsEntryLevel = true; this.cboSemester.Enabled = _studentManager.IsSemestralByCourse(_enrolmentCourseInfo.CourseInfo.CourseId); }//-----------------------------
} //-------------------------------- //this function determines if the course title and acronym exist public Boolean IsExistTitleAcronymCourseInformation(CommonExchange.SysAccess userInfo, CommonExchange.CourseInformation courseInfo) { Boolean isExist = false; using (RemoteClient.RemCntCourseManager remClient = new RemoteClient.RemCntCourseManager()) { isExist = remClient.IsExistTitleAcronymCourseInformation(userInfo, courseInfo); } return(isExist); } //--------------------------------
//#########################################CLASS Course EVENTS########################################################### //event is raised when the class is loaded protected virtual void ClassLoad(object sender, EventArgs e) { _courseInfo = new CommonExchange.CourseInformation(); }//--------------------------------