コード例 #1
0
        //###########################################CLASS StudentManager EVENTS#####################################################
        //event is raised when the class is loaded
        private void ClassLoad(object sender, EventArgs e)
        {
            _studentManager = new StudentLoadingLogic(_userInfo);

            try
            {
                if (!(RemoteServerLib.ProcStatic.IsSystemAccessAdmin(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessOfficeUser(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessCashier(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessVpOfFinance(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessVpOfAcademicAffairs(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessCollegeRegistrar(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessStudentDataController(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessSecretaryOftheVpOfAcademicAffairs(_userInfo)))
                {
                    throw new Exception("You are not authorized to access this module.");
                }

                _studentManager.InitializeSchoolYearComboManager(this.ctlManager.SchoolYearComboBox);
                _studentManager.InitializeCourseCheckedListBox(this.ctlManager.CourseCheckedListBox);
                _studentManager.InitializeYearLevelCheckedListBox(this.ctlManager.YearLevelCheckedListBox);

                _frmStudentSearch = new SearchListForStudent();
                _frmStudentSearch.OnDoubleClickEnter               += new SearchListDataGridDoubleClickEnterStudent(_frmStudentSearchOnDoubleClickEnter);
                _frmStudentSearch.OnDataSourceChange               += new SearchListDataSourceChange(_frmStudentSearchOnDataSourceChange);
                _frmStudentSearch.OnPrintStudentLoadClick          += new SearchListPrintButtonClick(_frmStudentSearchOnPrintStudentLoadClick);
                _frmStudentSearch.OnPrintStatementOfAccountClick   += new SearchListPrintButtonClick(_frmStudentSearchOnPrintStatementOfAccountClick);
                _frmStudentSearch.OnPrintStudentMasterListClick    += new SearchListPrintButtonClick(_frmStudentSearchOnPrintStudentMasterListClick);
                _frmStudentSearch.OnPrintStudentInsuranceListClick += new SearchListPrintButtonClick(_frmStudentSearchOnPrintStudentInsuranceListClick);
                _frmStudentSearch.OnPrintStudentEnrolmentListClick += new SearchListPrintButtonClick(_frmStudentSearchOnPrintStudentEnrolmentListClick);
                _frmStudentSearch.OnPrintStudentListClick          += new SearchListPrintButtonClick(_frmStudentSearchOnPrintStudentListClick);
                _frmStudentSearch.OnPrintStudentQuickCountClick    += new SearchListPrintButtonClick(_frmStudentSearchOnPrintStudentQuickCountClick);

                _frmStudentSearch.LocationPoint = new Point(14, 300);
                _frmStudentSearch.AdoptGridSize = false;
                _frmStudentSearch.MdiParent     = this;

                lblRecordDate.Text = "Record Date: " + DateTime.Parse(_studentManager.ServerDateTime).ToString();
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog("\n" + ex.Message, "Error Authenticating");

                this.Close();
            }
        }//-------------------------------
コード例 #2
0
        }//----------------------------

        //event is raised when the control is clicked
        private void ctlManagerOnResetLinkClicked()
        {
            this.ctlManager.OnSchoolYearSelectedIndexChanged -=
                new RemoteClient.ControlStudentManagerSchoolYearSelectedIndexChanged(ctlManagerOnSchoolYearSelectedIndexChanged);
            this.ctlManager.OnCourseSelectedIndexChanged -=
                new RemoteClient.ControlStudentManagerCheckedListBoxSelectedIndexChanged(ctlManagerOnCourseSelectedIndexChanged);
            this.ctlManager.OnYearLevelSelectedIndexChanged -=
                new RemoteClient.ControlStudentManagerCheckedListBoxSelectedIndexChanged(ctlManagerOnYearLevelSelectedIndexChanged);

            _studentManager.InitializeSchoolYearComboManager(this.ctlManager.SchoolYearComboBox);

            this.ctlManager.SemesterComboBox.Items.Clear();

            _studentManager.InitializeCourseCheckedListBox(this.ctlManager.CourseCheckedListBox);
            _studentManager.InitializeYearLevelCheckedListBox(this.ctlManager.YearLevelCheckedListBox);

            this.ctlManager.OnSchoolYearSelectedIndexChanged -=
                new RemoteClient.ControlStudentManagerSchoolYearSelectedIndexChanged(ctlManagerOnSchoolYearSelectedIndexChanged);
            this.ctlManager.OnCourseSelectedIndexChanged -=
                new RemoteClient.ControlStudentManagerCheckedListBoxSelectedIndexChanged(ctlManagerOnCourseSelectedIndexChanged);
            this.ctlManager.OnYearLevelSelectedIndexChanged -=
                new RemoteClient.ControlStudentManagerCheckedListBoxSelectedIndexChanged(ctlManagerOnYearLevelSelectedIndexChanged);
            this.ctlManager.OnSchoolYearSelectedIndexChanged +=
                new RemoteClient.ControlStudentManagerSchoolYearSelectedIndexChanged(ctlManagerOnSchoolYearSelectedIndexChanged);
            this.ctlManager.OnCourseSelectedIndexChanged +=
                new RemoteClient.ControlStudentManagerCheckedListBoxSelectedIndexChanged(ctlManagerOnCourseSelectedIndexChanged);
            this.ctlManager.OnYearLevelSelectedIndexChanged +=
                new RemoteClient.ControlStudentManagerCheckedListBoxSelectedIndexChanged(ctlManagerOnYearLevelSelectedIndexChanged);

            _frmStudentSearch.WindowState = FormWindowState.Minimized;

            _dateStart = String.Empty;
            _dateEnd   = String.Empty;

            _frmStudentSearch.DisableEnableButtonStudentRecordStatementOfAccount(false, _userInfo);
            _frmStudentSearch.DisableEnablePrintStudentMasterStudentEnrolmentList(false, _userInfo);
            _frmStudentSearch.DisableEnableButtonStudentList(_userInfo, false);
        }//----------------------------