public SchoolFeeMaintenance(CommonExchange.SysAccess userInfo, CommonExchange.SchoolFeeInformation feeInfo, SchoolFeeLogic schoolFeeManager, String courseGroupId) { this.InitializeComponent(); _levelInfo = new CommonExchange.SchoolFeeLevel(); _detailsInfo = new CommonExchange.SchoolFeeDetails(); _userInfo = userInfo; _schoolFeeManager = schoolFeeManager; _levelInfo.SchoolFeeInfo.FeeInformationSysId = _detailsInfo.SchoolFeeLevelInfo.SchoolFeeInfo.FeeInformationSysId = feeInfo.FeeInformationSysId; _levelInfo.SchoolFeeInfo.SchoolYearInfo.YearId = _detailsInfo.SchoolFeeLevelInfo.SchoolFeeInfo.SchoolYearInfo.YearId = feeInfo.SchoolYearInfo.YearId; _detailsInfo.SchoolFeeLevelInfo.YearLevelInfo.CourseGroupInfo.CourseGroupId = courseGroupId; _errProvider = new ErrorProvider(); this.Load += new EventHandler(ClassLoad); this.cboYearLevel.SelectedIndexChanged += new EventHandler(cboYearLevelSelectedIndexChanged); this.lnkCreateYearLevel.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkCreateYearLevelLinkClicked); this.lnkCreateSchoolFeeDetails.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkCreateLinkClicked); this.dgvSchoolFees.MouseDown += new MouseEventHandler(dgvSchoolFeesMouseDown); this.dgvSchoolFees.DoubleClick += new EventHandler(dgvSchoolFeesDoubleClick); this.btnClose.Click += new EventHandler(btnCloseClick); }
//#####################################################CLASS SCHOOLFEEMANAGER EVENTS ################################################################# //event is raised when the class is loaded private void ClassLoad(object sender, EventArgs e) { try { _schoolFeeManager = new SchoolFeeLogic(_userInfo); _feeInfo = new CommonExchange.SchoolFeeInformation(); if (!(RemoteServerLib.ProcStatic.IsSystemAccessAdmin(_userInfo) || RemoteServerLib.ProcStatic.IsSystemAccessVpOfFinance(_userInfo) || RemoteServerLib.ProcStatic.IsSystemAccessCashier(_userInfo))) { throw new Exception("You are not authorized to access this module."); } else { _schoolFeeManager.InitializeSchoolYearCombo(this.cboYear); if (String.IsNullOrEmpty(_feeInfo.SchoolYearInfo.YearId)) { this.lblStatus.Visible = this.btnRecord.Visible = false; } this.InitializeListViewControl(); } } catch (Exception ex) { RemoteClient.ProcStatic.ShowErrorDialog("\n" + ex.Message, "Error Authenticating"); this.Close(); } }//-----------------------------------