}//------------------------ //event is raised when the control is double clicked private void dgvStudentEnrolledDoubleClick(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; StudentLoadingLogic studentManager = new StudentLoadingLogic(_userInfo); studentManager.GetSearchedStudentInformation(_userInfo, _sysIdStudent, String.Empty, String.Empty, String.Empty, String.Empty); using (StudentLoading frmShow = new StudentLoading(_userInfo, _scheduleManager.GetDetailsStudentInformation(_userInfo, _sysIdStudent, Application.StartupPath), studentManager)) { frmShow.ShowDialog(this); _scheduleManager.SelectBySysIDScheduleListStudentLoad(_userInfo, _schedInfo.ScheduleSysId); this.dgvStudentEnrolled.DataSource = _scheduleManager.GetStudentEnrolled(true); this.dgvStudentWithdrawn.DataSource = _scheduleManager.GetStudentEnrolled(false); this.tblStudentEnrolled.Text = "Student Enrolled (" + this.dgvStudentEnrolled.Rows.Count.ToString() + ")"; this.tblStudentWithdrawn.Text = "Student Withdrawn (" + this.dgvStudentWithdrawn.Rows.Count.ToString() + ")"; } } catch { RemoteClient.ProcStatic.ShowErrorDialog("Error Loading Student Loading Mudule.", "Error Loading"); } finally { this.Cursor = Cursors.Arrow; } }//------------------------
}//---------------------------- //############################################END CONTROLCLASSROOMSUBJECTMANAGER ctlManager EVENTS########################################## #endregion #region Programer-Define Void Procedures //this procedure shows the search result private void ShowSearchResultDialog() { try { this.Cursor = Cursors.WaitCursor; String queryString = RemoteClient.ProcStatic.TrimStartEndString(ctlManager.GetSearchString); if (!String.IsNullOrEmpty(queryString)) { _frmStudentSearch.DataSource = _studentManager.GetSearchedStudentInformation(_userInfo, queryString, _dateStart, _dateEnd, _studentManager.GetCourseYearLevelStringFormat(this.ctlManager.YearLevelCheckedListBox, false), _studentManager.GetCourseYearLevelStringFormat(this.ctlManager.CourseCheckedListBox, true)); } _frmStudentSearch.SetProgressBarValue(0); if (this.ctlManager.SchoolYearComboBox.SelectedIndex <= -1) { _frmStudentSearch.DisableEnableButtonStudentRecordStatementOfAccount(false, _userInfo); } else { _frmStudentSearch.DisableEnableButtonStudentRecordStatementOfAccount(true, _userInfo); } if ((this.ctlManager.SchoolYearComboBox.SelectedIndex >= 0 || this.ctlManager.SemesterComboBox.SelectedIndex >= 0) && (this.ctlManager.CourseCheckedListBox.CheckedIndices.Count != 0 && this.ctlManager.YearLevelCheckedListBox.CheckedIndices.Count != 0)) { _frmStudentSearch.DisableEnablePrintStudentMasterStudentEnrolmentList(true, _userInfo); } else { _frmStudentSearch.DisableEnablePrintStudentMasterStudentEnrolmentList(false, _userInfo); } } catch (Exception ex) { RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Retrieving Data"); } finally { this.ctlManager.SetFocusOnSearchTextBox(); this.Cursor = Cursors.Arrow; } }//---------------------------------