Exemple #1
0
        }//-------------------------------

        //############################################END CLASS TeacherLoading EVENTS#######################################################

        //################################################COMBOBOX choYear EVENTS####################################################
        //event is raised when the control selected index is changed
        private void cboYearSelectedIndexChanged(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            if (this.AskConfirmationForTeacherLoading("school year", true, false))
            {
                if (this.cboYear.SelectedIndex != -1)
                {
                    _teacherLoadingManager.InitializeSemesterCombo(this.cboSemester, this.cboYear.SelectedIndex);

                    _dateStart =
                        _teacherLoadingManager.GetSchoolYearDateStart(_teacherLoadingManager.GetSchoolYearYearId(this.cboYear.SelectedIndex)).ToShortDateString()
                        + " 12:00:00 AM";
                    _dateEnd =
                        _teacherLoadingManager.GetSchoolYearDateEnd(_teacherLoadingManager.GetSchoolYearYearId(this.cboYear.SelectedIndex)).ToShortDateString()
                        + " 11:59:59 PM";

                    _teacherLoadingManager.SelectByDateStartEndForTeacherLoadingTeacherLoad(_userInfo, _dateStart, _dateEnd);

                    this.InitializeEmployeeInformationTreeView();
                }

                this.ResetControls();

                this.SetRecordStatus();

                _oldIndexYear = this.cboYear.SelectedIndex;

                //to reset ask confirmation flag
                _hasEnterAskConfirmation = false;
            }

            this.Cursor = Cursors.Arrow;
        }//--------------------------------