Exemple #1
0
        //############################################CLASS TeacherLoading EVENTS#######################################################
        //event is raised when the class is loaded
        private void ClassLoad(object sender, EventArgs e)
        {
            _teacherLoadingManager = new TeacherLoadingLogic(_userInfo);

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

                if (RemoteServerLib.ProcStatic.IsSystemAccessCollegeRegistrar(_userInfo))
                {
                    this.btnRecord.Visible = this.btnLoadScheduleDetails.Visible = this.toolStripSeparator.Visible = false;
                }

                if (RemoteServerLib.ProcStatic.IsSystemAccessPayrollMaster(_userInfo))
                {
                    this.btnLoadScheduleDetails.Enabled = this.lnkPrintStudentEnrolled.Visible = this.txtScheduleSearch.Enabled = false;
                }

                this.btnRecord.Enabled = false;

                _teacherLoadingManager.InitializeSchoolYearCombo(this.cboYear);

                if (!(CommonExchange.EnrolmentComponent.IncludeCollege || CommonExchange.EnrolmentComponent.IncludeGradeSchoolKinder))
                {
                    this.cboSemester.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog("\n" + ex.Message, "Error Authenticating");

                this.Close();
            }
        }//------------------------------