Example #1
0
        //####################################################CLASS SubjectSchedulingManager EVENTS###############################################
        //event is raised when the class is loaded
        private void ClassLoad(object sender, EventArgs e)
        {
            try
            {
                if (!(RemoteServerLib.ProcStatic.IsSystemAccessAdmin(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessVpOfAcademicAffairs(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessOfficeUser(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessCashier(_userInfo) ||
                      RemoteServerLib.ProcStatic.IsSystemAccessVpOfFinance(_userInfo)))
                {
                    throw new Exception("You are not authorized to access this module.");
                }

                _scheduleManager = new SubjectSchedulingLogic(_userInfo);

                _frmSubjectScheduleSearch = new SubjectScheduleSearchList();
                _frmSubjectScheduleSearch.OnDoubleClickEnter += new SearchListDataGridDoubleClickEnter(_frmSubjectScheduleSearchOnDoubleClickEnter);
                _frmSubjectScheduleSearch.OnCreate           += new SubjectScheduleSearchListLinkCreateClick(frmSubjectScheduleSearchOnCreate);
                _frmSubjectScheduleSearch.OnPrint            += new SubjectScheduleSearchListLinkCreateClick(_frmSubjectScheduleSearchOnPrint);
                _frmSubjectScheduleSearch.LocationPoint       = new Point(10, 400);
                _frmSubjectScheduleSearch.AdoptGridSize       = false;
                _frmSubjectScheduleSearch.MdiParent           = this;

                if (RemoteServerLib.ProcStatic.IsSystemAccessCashier(_userInfo) || RemoteServerLib.ProcStatic.IsSystemAccessVpOfFinance(_userInfo))
                {
                    _frmSubjectScheduleSearch.SetCreateButton(false);
                }

                _scheduleManager.InitializeSchoolYearCombo(this.ctlManager.SchoolYearComboBox);

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

                this.Close();
            }
        }