}//----------------------

        //#####################################################END CLASS SchoolFeeMaintenace EVENTS #################################################################

        //#####################################################COMBOBOX cboYearLevel EVENTS #################################################################
        //event is raised when the selected index is change
        private void cboYearLevelSelectedIndexChanged(object sender, EventArgs e)
        {
            this.SetDataGridViewSource(_schoolFeeManager.GetSchoolFeeByYearLevel(_detailsInfo.SchoolFeeLevelInfo.YearLevelInfo.CourseGroupInfo.CourseGroupId,
                                                                                 _schoolFeeManager.GetYearLevelId(_detailsInfo.SchoolFeeLevelInfo.YearLevelInfo.CourseGroupInfo.CourseGroupId, this.cboYearLevel.Text)));

            _levelInfo.FeeLevelSysId = _detailsInfo.SchoolFeeLevelInfo.FeeLevelSysId =
                _schoolFeeManager.GetFeelLevelId(_schoolFeeManager.GetYearLevelId(_detailsInfo.SchoolFeeLevelInfo.YearLevelInfo.CourseGroupInfo.CourseGroupId,
                                                                                  this.cboYearLevel.Text));

            _levelInfo.YearLevelInfo.YearLevelId = _detailsInfo.SchoolFeeLevelInfo.YearLevelInfo.YearLevelId =
                _schoolFeeManager.GetYearLevelId(_detailsInfo.SchoolFeeLevelInfo.YearLevelInfo.CourseGroupInfo.CourseGroupId, this.cboYearLevel.Text);

            if (!_schoolFeeManager.IsExistsSchoolFeeYearLevel(_schoolFeeManager.GetYearLevelId(_detailsInfo.SchoolFeeLevelInfo.YearLevelInfo.CourseGroupInfo.CourseGroupId,
                                                                                               this.cboYearLevel.Text)))
            {
                this.lnkCreateYearLevel.Visible = true;
                this.dgvSchoolFees.Enabled      = this.lnkCreateSchoolFeeDetails.Visible = false;
            }
            else
            {
                this.dgvSchoolFees.Enabled             = true;
                this.lnkCreateYearLevel.Visible        = false;
                this.lnkCreateSchoolFeeDetails.Visible = this.cboYearLevel.SelectedIndex >= 0 ? true : false;
            }

            this.dgvSchoolFees.Focus();
        }//-----------------------------
예제 #2
0
        }//--------------------------------------

        //#####################################################END LABEL lnkCreateFee EVENTS###################################################################

        //#####################################################LINKLABEL lnkSchoolFeeMaintenance EVENTS######################################################
        //event is raised when the link is clicked
        private void lnkSchoolFeeMaintenanceLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                using (SchoolFeeMaintenance frmMaintenace = new SchoolFeeMaintenance(_userInfo, _feeInfo, _schoolFeeManager, _courseGroupId))
                {
                    frmMaintenace.DataSource = _schoolFeeManager.GetSchoolFeeByYearLevel(_courseGroupId, _feeInfo.SchoolYearInfo.YearId);

                    frmMaintenace.ShowDialog(this);

                    if (frmMaintenace.HasUpdated)
                    {
                        this.PopulateListViewControl();

                        _hasUpdated  = true;
                        _hasRecorded = false;
                    }
                }
            }
            catch (Exception ex)
            {
                RemoteClient.ProcStatic.ShowErrorDialog(ex.Message + "\n\nError Loading School Fee Maintenance Module.", "Error Loading");
            }
        }//-------------------------------------