Exemplo n.º 1
0
        }//---------------------

        //################################################END LISTVIEW lstSubjectServiceLoad EVENTS####################################################

        //################################################LABEL lblDeloadScheduleServiceDetails EVENTS####################################################
        //event is raised when the control is clicked
        private void lnkDeloadScheduleServiceDetailsClick(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(_sysIdScheduleServiceDetails))
            {
                String strMsg = "Are you sure you want to deload [" + _scheduleServiceDetailsCodeTitle + "] ?";

                _scheduleServiceDetailsCodeTitle = String.Empty;

                DialogResult msgResult = MessageBox.Show(strMsg, "Confirm Deload", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (msgResult == DialogResult.Yes)
                {
                    _teacherLoadingManager.DeleteTeacherLoad(_sysIdScheduleServiceDetails);

                    if (!String.IsNullOrEmpty(_teacherLoadingManager.GetEmployeeScheduleSysId(this.trvEmployee.SelectedNode.Text)))
                    {
                        if (this.cboSemester.SelectedIndex >= 0)
                        {
                            _teacherLoadingManager.InitializeSubjectServiceLoadListView(this.lsvSubjectServiceLoad, this.lstDeloadedSchedule,
                                                                                        this.tblLoadedSchedule, this.tblDeloadedSchedule,
                                                                                        _teacherLoadingManager.GetEmployeeScheduleSysId(this.trvEmployee.SelectedNode.Text),
                                                                                        _teacherLoadingManager.GetSchoolYearYearId(this.cboYear.SelectedIndex),
                                                                                        _teacherLoadingManager.GetSemesterSystemId(this.cboYear.SelectedIndex, this.cboSemester.SelectedIndex));
                        }
                        else
                        {
                            _teacherLoadingManager.InitializeSubjectServiceLoadListView(this.lsvSubjectServiceLoad, this.lstDeloadedSchedule,
                                                                                        this.tblLoadedSchedule, this.tblDeloadedSchedule,
                                                                                        _teacherLoadingManager.GetEmployeeScheduleSysId(this.trvEmployee.SelectedNode.Text),
                                                                                        _teacherLoadingManager.GetSchoolYearYearId(this.cboYear.SelectedIndex), String.Empty);
                        }

                        this.btnRecord.Enabled = true;

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