}//--------------------------- //#############################################END COMBOBOX cboYearSemester EVENTS################################################# //##############################################BUTTON btnSearchAuxiliary EVENTS#################################################### //event is raised when the button is clicked private void btnSearchAuxiliaryClick(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; using (AuxiliarySearchOnTextboxList frmSearch = new AuxiliarySearchOnTextboxList(_userInfo, _auxiliaryManager)) { frmSearch.AdoptGridSize = true; frmSearch.ShowDialog(this); if (frmSearch.HasSelected) { CommonExchange.AuxiliaryServiceInformation serviceInfo = _auxiliaryManager.GetDetailsAuxiliaryServiceInfomation(frmSearch.PrimaryId); _serviceInfoSchedule.AuxiliaryServiceInfo.AuxServiceSysId = serviceInfo.AuxServiceSysId; _serviceInfoSchedule.AuxiliaryServiceInfo.DepartmentInfo.DepartmentId = serviceInfo.DepartmentInfo.DepartmentId; _serviceInfoSchedule.AuxiliaryServiceInfo.DepartmentInfo.DepartmentName = serviceInfo.DepartmentInfo.DepartmentName; _serviceInfoSchedule.AuxiliaryServiceInfo.DescriptiveTitle = serviceInfo.DescriptiveTitle; _serviceInfoSchedule.AuxiliaryServiceInfo.CourseGroupInfo.IsSemestral = serviceInfo.CourseGroupInfo.IsSemestral; _serviceInfoSchedule.AuxiliaryServiceInfo.LabUnits = serviceInfo.LabUnits; _serviceInfoSchedule.AuxiliaryServiceInfo.LectureUnits = serviceInfo.LectureUnits; _serviceInfoSchedule.AuxiliaryServiceInfo.NoHours = serviceInfo.NoHours; _serviceInfoSchedule.AuxiliaryServiceInfo.ServiceCode = serviceInfo.ServiceCode; lblSysIdAuxiliary.Text = serviceInfo.AuxServiceSysId; lblAuxiliaryCodeDescription.Text = serviceInfo.ServiceCode + " - " + serviceInfo.DescriptiveTitle; lblAuxiliaryDepartment.Text = serviceInfo.DepartmentInfo.DepartmentName; lblUnitsLabHours.Text = _auxiliaryManager.GetAuxiliaryUnitsHours(serviceInfo.LectureUnits, serviceInfo.LabUnits, serviceInfo.NoHours); _auxiliaryManager.InitializeSchoolYearSemesterCombo(this.cboYearSemester, serviceInfo.CourseGroupInfo.IsSemestral); this.tabAuxiliary.Enabled = true; } } } catch (Exception ex) { RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Auxiliary Service Infomation Search Module"); } finally { this.Cursor = Cursors.Arrow; } }//------------------------
//############################################CLASS SubjectScheduleDetails EVENTS####################################################### //event is raised when the class is loaded protected virtual void ClassLoad(object sender, EventArgs e) { if (_auxiliaryManager.MustOpenSchoolYearSemester()) { RemoteClient.ProcStatic.ShowErrorDialog("Please open another school year / semester before creating a new subject schedule.", "Error Creating A Subject Schedule"); _hasErrors = true; this.Close(); } _serviceInfoDetails = new CommonExchange.AuxiliaryServiceDetails(); this.lblSysIdAuxiliary.Text = _serviceInfoSchedule.AuxiliaryServiceInfo.AuxServiceSysId; this.lblAuxiliaryServiceCodeDescription.Text = _serviceInfoSchedule.AuxiliaryServiceInfo.ServiceCode + " - " + _serviceInfoSchedule.AuxiliaryServiceInfo.DescriptiveTitle; this.lblAuxiliaryDepartment.Text = _serviceInfoSchedule.AuxiliaryServiceInfo.DepartmentInfo.DepartmentName; this.lblUnitsLabHours.Text = _auxiliaryManager.GetAuxiliaryUnitsHours(_serviceInfoSchedule.AuxiliaryServiceInfo.LectureUnits, _serviceInfoSchedule.AuxiliaryServiceInfo.LabUnits, _serviceInfoSchedule.AuxiliaryServiceInfo.NoHours); _serviceInfoDetails.AuxiliaryServiceScheduleInfo.AuxiliaryServiceInfo.ServiceCode = _serviceInfoSchedule.AuxiliaryServiceInfo.ServiceCode; _serviceInfoDetails.AuxiliaryServiceScheduleInfo.AuxiliaryServiceInfo.DescriptiveTitle = _serviceInfoSchedule.AuxiliaryServiceInfo.DescriptiveTitle; _serviceInfoDetails.NoHours = this.hrmHours.SelectedHourMinute; _serviceInfoDetails.AuxiliaryServiceScheduleInfo.AuxServiceScheduleSysId = _serviceInfoSchedule.AuxServiceScheduleSysId; //if (_serviceInfoSchedule.AuxiliaryServiceInfo.CourseGroupInfo.IsSemestral) //{ // this.optUnits.Enabled = this.optUnits.Checked = true; // this.txtLecture.Enabled = true; // this.txtLaboratory.Enabled = true; //} //else //{ // this.optHours.Enabled = this.optHours.Checked = true; // this.hrmHours.Enabled = true; //} }//------------------------