}//------------------- //############################################END CLASS ClassroomDateTimeForModular EVENTS####################################################### //################################################BUTTON btnSearchClassromm EVENTS#################################################### //event is raised when btnSearchClassromm is Clicked private void btnSearchClassroomClick(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; using (ClassroomSearchOnTextboxList frmSearch = new ClassroomSearchOnTextboxList(_userInfo, _scheduleManager)) { frmSearch.AdoptGridSize = true; frmSearch.ShowDialog(this); if (frmSearch.HasSelected) { this.Cursor = Cursors.WaitCursor; _classRoomInfo = _scheduleManager.GetDetailsClassroomInformation(frmSearch.PrimaryId); this.lblClassroomCode.Text = _classRoomInfo.ClassroomCode; this.lblMaxCapacity.Text = _classRoomInfo.MaximumCapacity.ToString(); this.txtDayAndTime.Focus(); } } } catch (Exception ex) { RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Classroom Search Module"); } finally { this.Cursor = Cursors.Arrow; } }//-----------------
}//---------------------- //############################################END CLASS ClassroomDateTimeScheduler EVENTS####################################################### //################################################BUTTON btnSearchClassromm EVENTS#################################################### //event is raised when btnSearchClassromm is Clicked private void btnSearchClassroomClick(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; using (ClassroomSearchOnTextboxList frmSearch = new ClassroomSearchOnTextboxList(_userInfo, _scheduleManager)) { frmSearch.AdoptGridSize = true; frmSearch.ShowDialog(this); if (frmSearch.HasSelected) { this.Cursor = Cursors.WaitCursor; this.gbxDayTime.Enabled = true; _classRoomInfo = _scheduleManager.GetDetailsClassroomInformation(frmSearch.PrimaryId); this.lblClassroomCode.Text = _classRoomInfo.ClassroomCode; this.lblMaxCapacity.Text = _classRoomInfo.MaximumCapacity.ToString(); DateTime dateStart = DateTime.Parse(_scheduleManager.ServerDateTime); DateTime dateEnd = dateStart; if (_schedInfo.SubjectInfo.CourseGroupInfo.IsSemestral && !String.IsNullOrEmpty(_schedInfo.SemesterInfo.SemesterSysId)) { dateStart = _scheduleManager.GetSemesterDateStart(_schedInfo.SemesterInfo.SemesterSysId); dateEnd = _scheduleManager.GetSemesterDateEnd(_schedInfo.SemesterInfo.SemesterSysId); } else if (!_schedInfo.SubjectInfo.CourseGroupInfo.IsSemestral && !String.IsNullOrEmpty(_schedInfo.SchoolYearInfo.YearId)) { dateStart = _scheduleManager.GetSchoolYearDateStart(_schedInfo.SchoolYearInfo.YearId); dateEnd = _scheduleManager.GetSchoolYearDateEnd(_schedInfo.SchoolYearInfo.YearId); } _scheduleManager.SelectByClassroomCodeSubjectSchedule(_userInfo, dateStart.ToString(), dateEnd.ToString(), _classRoomInfo.ClassroomSysId, _schedDetailsInfo.ScheduleDetailsSysId); this.ctfDayTime.InitializeTimeFrameTables(_scheduleManager.GetWeekDayTable(this.ctfDayTime.WeekDayIdFieldName, this.ctfDayTime.WeekDayDescriptionFieldName, this.ctfDayTime.WeekDayAcronymFieldName), _scheduleManager.GetWeekTimeTable(this.ctfDayTime.TimeIdFieldName, this.ctfDayTime.TimeDescriptionFieldName), _scheduleManager.GetReadOnlySlotTable(this.ctfDayTime.ReadOnlySubjectCodeFieldName, this.ctfDayTime.TimeIdFieldName, this.ctfDayTime.WeekDayIdFieldName), 10); this.ctfDayTime.TimeFrames = _scheduleManager.GetTimeFrames(this.ctfDayTime.NumberOfDaysDisplayed, this.ctfDayTime.NumberOfTimeSlotsDisplayed, (Int32)RemoteClient.ControlTimeFrame.SelectedReadOnlyIndex.Selected, (Int32)RemoteClient.ControlTimeFrame.SelectedReadOnlyIndex.ReadOnly, (Int32)RemoteClient.ControlTimeFrame.SelectedValue.Selected, (Int32)RemoteClient.ControlTimeFrame.ReadOnlyValue.ReadOnly, (Int32)RemoteClient.ControlTimeFrame.SelectedValue.NotSelected, (Int32)RemoteClient.ControlTimeFrame.ReadOnlyValue.NotReadOnly); } } } catch (Exception ex) { RemoteClient.ProcStatic.ShowErrorDialog(ex.Message, "Error Loading Classroom Search Module"); } finally { this.Cursor = Cursors.Arrow; } }//-------------------------