public FieldroomDateTimeForModular(CommonExchange.SysAccess userInfo, CommonExchange.ScheduleInformation schedInfo,
                                           SubjectSchedulingLogic scheduleManager, ref CommonExchange.ScheduleInformationDetails scheduleDetailsInfo)
        {
            this.InitializeComponent();

            _userInfo         = userInfo;
            _schedInfo        = schedInfo;
            _scheduleManager  = scheduleManager;
            _schedDetailsInfo = scheduleDetailsInfo;

            this.txtDayAndTime.Validated += new EventHandler(txtDayAndTimeValidated);
        }
        public FieldroomDateTimeScheduler(CommonExchange.SysAccess userInfo, CommonExchange.ScheduleInformation schedInfo,
                                          SubjectSchedulingLogic scheduleManager, CommonExchange.ScheduleInformationDetails scheduleDetailsInfo)
        {
            this.InitializeComponent();

            _userInfo         = userInfo;
            _schedInfo        = schedInfo;
            _scheduleManager  = scheduleManager;
            _schedDetailsInfo = scheduleDetailsInfo;

            this.Load += new EventHandler(ClassLoad);
        }
예제 #3
0
        public SubjectScheduleDetailsUpdate(CommonExchange.SysAccess userInfo, SubjectSchedulingLogic scheduleManager,
                                            CommonExchange.ScheduleInformation schedInfo, CommonExchange.ScheduleInformationDetails schedDetailsInfo)
            : base(userInfo, scheduleManager, schedInfo)
        {
            this.InitializeComponent();

            _schedDetailsInfo = schedDetailsInfo;

            this.FormClosing     += new FormClosingEventHandler(ClassClossing);
            this.btnClose.Click  += new EventHandler(btnCloseClick);
            this.btnEdit.Click   += new EventHandler(btnUpdateClick);
            this.btnDelete.Click += new EventHandler(btnDeleteClick);
        }
        public ClassroomDateTimeScheduler(CommonExchange.SysAccess userInfo, CommonExchange.ScheduleInformation schedInfo,
                                          SubjectSchedulingLogic scheduleManager, CommonExchange.ScheduleInformationDetails scheduleDetailsInfo)
        {
            this.InitializeComponent();

            _userInfo         = userInfo;
            _scheduleManager  = scheduleManager;
            _schedInfo        = schedInfo;
            _schedDetailsInfo = scheduleDetailsInfo;

            _errProvider = new ErrorProvider();

            this.Load += new EventHandler(ClassLoad);
            this.btnSearchClassroom.Click += new EventHandler(btnSearchClassroomClick);
        }
        //############################################CLASS SubjectScheduleDetails EVENTS#######################################################
        //event is raised when the class is loaded
        protected virtual void ClassLoad(object sender, EventArgs e)
        {
            if (_scheduleManager.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();
            }

            _schedDetailsInfo = new CommonExchange.ScheduleInformationDetails();

            lblSysIdSubject.Text           = _schedInfo.SubjectInfo.SubjectSysId;
            lblSubjectCodeDescription.Text = _schedInfo.SubjectInfo.SubjectCode + " - " + _schedInfo.SubjectInfo.DescriptiveTitle;
            lblSubjectDepartment.Text      = _schedInfo.SubjectInfo.DepartmentInfo.DepartmentName;
            lblUnitsLabHours.Text          = _scheduleManager.GetSubjectUnitsHours(_schedInfo.SubjectInfo.LectureUnits, _schedInfo.SubjectInfo.LabUnits,
                                                                                   _schedInfo.SubjectInfo.NoHours);

            _schedDetailsInfo.ScheduleInfo.SubjectInfo.SubjectCode      = _schedInfo.SubjectInfo.SubjectCode;
            _schedDetailsInfo.ScheduleInfo.SubjectInfo.DescriptiveTitle = _schedInfo.SubjectInfo.DescriptiveTitle;
            _schedDetailsInfo.NoHours = this.hrmHours.SelectedHourMinute;
            _schedDetailsInfo.ScheduleInfo.ScheduleSysId = _schedInfo.ScheduleSysId;

            //if (_schedInfo.SubjectInfo.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;
            //}

            optTBA.Checked = true;
        }//------------------------
        public FieldRoomDateTimeSchedulerUpdate(CommonExchange.SysAccess userInfo, CommonExchange.ScheduleInformation schedInfo,
                                                SubjectSchedulingLogic scheduleManager, CommonExchange.ScheduleInformationDetails schedDetailsInfo)
            : base(userInfo, schedInfo, scheduleManager, schedDetailsInfo)
        {
            this.InitializeComponent();

            //this.Load += new EventHandler(ClassLoad);
            this.FormClosing    += new FormClosingEventHandler(ClassClossing);
            this.btnClose.Click += new EventHandler(btnCloseClick);
            this.btnEdit.Click  += new EventHandler(btnEditClick);
        }
예제 #7
0
        public ClassroomDateTimeSchedulerCreate(CommonExchange.SysAccess userInfo, CommonExchange.ScheduleInformation schedInfo,
                                                SubjectSchedulingLogic scheduleManager, CommonExchange.ScheduleInformationDetails schedDetailsInfo)
            : base(userInfo, schedInfo, scheduleManager, schedDetailsInfo)
        {
            this.InitializeComponent();

            this.FormClosing     += new FormClosingEventHandler(ClassClosing);
            this.btnCancel.Click += new EventHandler(btnCloseClick);
            this.btnInsert.Click += new EventHandler(btnInsertClick);
        }
예제 #8
0
        //#####################################CLASS SubjectScheduleDetailsUpate EVENTS########################################
        //event is raised when the class is loaded
        protected override void ClassLoad(object sender, EventArgs e)
        {
            _isForUpdate = true;

            _schedDetailsInfo.ScheduleInfo.SubjectInfo.SubjectCode      = _schedInfo.SubjectInfo.SubjectCode;
            _schedDetailsInfo.ScheduleInfo.SubjectInfo.DescriptiveTitle = _schedInfo.SubjectInfo.DescriptiveTitle;

            lblSysIdSubject.Text           = _schedInfo.SubjectInfo.SubjectSysId;
            lblSubjectCodeDescription.Text = _schedInfo.SubjectInfo.SubjectCode + " - " + _schedInfo.SubjectInfo.DescriptiveTitle;
            lblSubjectDepartment.Text      = _schedInfo.SubjectInfo.DepartmentInfo.DepartmentName;
            lblUnitsLabHours.Text          = _scheduleManager.GetSubjectUnitsHours(_schedInfo.SubjectInfo.LectureUnits,
                                                                                   _schedInfo.SubjectInfo.LabUnits, _schedInfo.SubjectInfo.NoHours);

            this.optField.CheckedChanged  -= new EventHandler(optFieldCheckedChanged);
            this.optTBA.CheckedChanged    -= new EventHandler(optTBACheckedChanged);
            this.optCampus.CheckedChanged -= new EventHandler(optCampusCheckedChanged);

            if (String.IsNullOrEmpty(_schedDetailsInfo.ClassroomInfo.ClassroomSysId) &&
                (String.IsNullOrEmpty(_schedDetailsInfo.FieldRoom) && String.Equals(_schedDetailsInfo.DayTimeFieldRoom, "TBA")))
            {
                this.optTBA.Checked                       = true;
                this.optField.Checked                     = this.optCampus.Checked = this.lblClassCode.Visible = this.lnkEdit.Visible =
                    this.txtFieldRoom.Visible             = this.lblMCapacity.Visible = this.pnlClassroomBased.Visible =
                        this.lnkEditTimeFieldRoom.Visible = this.pnlFieldRoom.Visible = false;
            }
            else
            {
                this.optTBA.Checked    = false;
                this.optField.Checked  = !_schedDetailsInfo.IsClassroom;
                this.optCampus.Checked = _schedDetailsInfo.IsClassroom;

                if (!_schedDetailsInfo.IsClassroom)
                {
                    this.lblClassCode.Visible = this.lblMCapacity.Visible = this.lnkEdit.Visible = false;
                }
            }

            if (this.optField.Checked)
            {
                this.txtFieldRoom.Enabled = this.txtFieldRoom.Visible = this.lnkEditTimeFieldRoom.Visible = true;
                this.txtFieldRoom.Text    = _schedDetailsInfo.FieldRoom;
                this.lblEditTimeClassroomBased.Visible = this.pnlClassroomBased.Visible = this.lnkEdit.Visible = false;

                this.lblFieldRoomTime.Text = !_schedInfo.IsIrregularModular ? _schedDetailsInfo.DayTimeFieldRoom :
                                             String.IsNullOrEmpty(_schedDetailsInfo.ManualScheduleFieldRoom) ? "TBA" : _schedDetailsInfo.ManualScheduleFieldRoom;

                this.lblEditTimeClassroomBased.Text = String.Empty;
            }
            else if (this.optCampus.Checked)
            {
                this.txtFieldRoom.Enabled = this.lnkEditTimeFieldRoom.Visible = this.pnlFieldRoom.Visible = false;
                this.lblEditTimeClassroomBased.Visible = this.pnlClassroomBased.Visible = this.lnkEdit.Visible = true;
            }

            if (_schedDetailsInfo.LectureUnits > 0 || _schedDetailsInfo.LabUnits > 0)
            {
                this.optUnits.Checked      = true;
                this.txtLecture.Enabled    = true;
                this.txtLaboratory.Enabled = true;
            }
            else
            {
                this.optHours.Checked = true;
                this.hrmHours.Enabled = true;

                Int32 hours = 0, minutes = 0, count = 1;

                if (!String.IsNullOrEmpty(_schedDetailsInfo.NoHours))
                {
                    String[] strSplit = _schedDetailsInfo.NoHours.Split(':');

                    foreach (String value in strSplit)
                    {
                        if (!String.IsNullOrEmpty(value))
                        {
                            if (count == 1)
                            {
                                hours = Int32.Parse(value);
                            }
                            else
                            {
                                minutes = Int32.Parse(value);
                            }
                        }

                        count++;
                    }
                }

                this.hrmHours.SetHoursMinutes(hours, minutes);
            }

            this.optField.CheckedChanged  += new EventHandler(optFieldCheckedChanged);
            this.optTBA.CheckedChanged    += new EventHandler(optTBACheckedChanged);
            this.optCampus.CheckedChanged += new EventHandler(optCampusCheckedChanged);

            if (_schedDetailsInfo.IsClassroom)
            {
                this.lblClassCode.Visible     = true;
                this.lblMCapacity.Visible     = true;
                this.lblClassroomCode.Visible = true;
                this.lblMaxCapacity.Visible   = true;
                this.lnkEdit.Visible          = this.pnlClassroomBased.Visible = this.lnkEdit.Visible = true;

                this.lblClassroomCode.Text = _schedDetailsInfo.ClassroomInfo.ClassroomCode;
                this.lblMaxCapacity.Text   = _schedDetailsInfo.ClassroomInfo.MaximumCapacity.ToString();

                this.lblEditTimeClassroomBased.Text = !_schedInfo.IsIrregularModular ? _schedDetailsInfo.DayTimeClassroom :
                                                      String.IsNullOrEmpty(_schedDetailsInfo.ManualScheduleClassroom) ? "TBA" : _schedDetailsInfo.ManualScheduleClassroom;

                String temp = this.lblEditTimeClassroomBased.Text.Replace("&", "&&");

                this.lblEditTimeClassroomBased.Text = temp;

                this.lblFieldRoomTime.Text = String.Empty;
            }

            this.txtLecture.Text    = _schedDetailsInfo.LectureUnits.ToString();
            this.txtLaboratory.Text = _schedDetailsInfo.LabUnits.ToString();
            this.txtSection.Text    = _schedDetailsInfo.Section;

            if (_schedInfo.SubjectInfo.CourseGroupInfo.IsSemestral)
            {
                _dateStart = _scheduleManager.GetSemesterDateStart(_schedInfo.SemesterInfo.SemesterSysId).ToShortDateString() + " 12:00:00 AM";
                _dateEnd   = _scheduleManager.GetSemesterDateEnd(_schedInfo.SemesterInfo.SemesterSysId).ToShortDateString() + " 11:59:59 PM";
            }
            else
            {
                _dateStart = _scheduleManager.GetSchoolYearDateStart(_schedInfo.SchoolYearInfo.YearId).ToShortDateString() + " 12:00:00 AM";
                _dateEnd   = _scheduleManager.GetSchoolYearDateEnd(_schedInfo.SchoolYearInfo.YearId).ToShortDateString() + " 11:59:59 PM";
            }

            if (RemoteClient.ProcStatic.IsRecordLocked(DateTime.Parse(_dateStart), DateTime.Parse(_dateEnd),
                                                       DateTime.Parse(_scheduleManager.ServerDateTime), (Int32)CommonExchange.SystemRange.MonthAllowance) ||
                !(RemoteServerLib.ProcStatic.IsSystemAccessAdmin(_userInfo) ||
                  RemoteServerLib.ProcStatic.IsSystemAccessVpOfAcademicAffairs(_userInfo) ||
                  RemoteServerLib.ProcStatic.IsSystemAccessOfficeUser(_userInfo, _schedInfo.SubjectInfo.DepartmentInfo.DepartmentId)) ||
                _schedInfo.IsMarkedDeleted)
            {
                this.lblStatus.Text    = "This record is LOCKED.";
                this.lblStatus.Visible = true;

                this.pbxLocked.Visible = true;
                this.pbxUnlock.Visible = false;

                this.btnDelete.Visible = this.btnEdit.Visible = this.lnkEdit.Visible = false;
            }
            else if (!String.IsNullOrEmpty(_schedDetailsInfo.EmployeeInfo.EmployeeSysId))
            {
                this.lblStatus.Text = "This record is LOCKED by " +
                                      RemoteClient.ProcStatic.GetCompleteNameMiddleInitial(_schedDetailsInfo.EmployeeInfo.PersonInfo.LastName,
                                                                                           _schedDetailsInfo.EmployeeInfo.PersonInfo.FirstName, _schedDetailsInfo.EmployeeInfo.PersonInfo.MiddleName);
                this.lblStatus.Visible = true;

                this.pbxLocked.Visible = true;
                this.pbxUnlock.Visible = false;

                this.btnDelete.Visible = this.btnEdit.Visible = this.lnkEdit.Visible = false;
            }
            else
            {
                this.lblStatus.Text    = "This record is OPEN.";
                this.lblStatus.Visible = true;

                this.pbxLocked.Visible = false;
                this.pbxUnlock.Visible = true;

                this.btnDelete.Visible = this.btnEdit.Visible = true;
            }

            _schedDetailsInfoTemp = (CommonExchange.ScheduleInformationDetails)_schedDetailsInfo.Clone();
        }//----------------------
예제 #9
0
        public ClassroomDateTimeSchedulerUpdate(CommonExchange.SysAccess userInfo, CommonExchange.ScheduleInformation schedInfo,
                                                String sysIdClassRoom, SubjectSchedulingLogic scheduleManager, CommonExchange.ScheduleInformationDetails schedDetailsInfo)
            : base(userInfo, schedInfo, scheduleManager, schedDetailsInfo)
        {
            this.InitializeComponent();

            _classRoomInfo     = _scheduleManager.GetDetailsClassroomInformation(sysIdClassRoom);
            _classRoomInfoTemp = (CommonExchange.ClassroomInformation)_classRoomInfo.Clone();

            this.FormClosing    += new FormClosingEventHandler(ClassClosing);
            this.btnClose.Click += new EventHandler(btnCloseClick);
            this.btnEdit.Click  += new EventHandler(btnEditClick);
        }