Beispiel #1
0
        private void GetEditForm(Appointment editedAppointment)
        {
            Appointment appointmentToEdit = ExamScheduler.PrepareToEdit(editedAppointment, ExamScheduler.EditingRecurringSeries);

            if (editedAppointment.ID == null)
            {
                StartTime.SelectedDate = ExamScheduler.UtcToDisplay(appointmentToEdit.Start);
            }
            else
            {
                string[] str = appointmentToEdit.Subject.Split('[');
                lblCourse.Text = str[0].ToString();
                string[] str1 = str[1].Split(']');
                lblExam.Text = str[1].Substring(0, str[1].Length - 1).ToString();
                lblExam.Text = str1[0].ToString();
                // lblSubjectValue.Text = str[0].ToString() + " [ " + str1[0].ToString() + " ] ";
                BEStudent obj = new BEStudent();
                obj.IntExamID  = 0;
                obj.IntTransID = Convert.ToInt64(appointmentToEdit.ID.ToString());
                BStudent obj1 = new BStudent();
                obj1.BGetExamStartEndDates(obj);

                if (obj.DtResult != null && obj.DtResult.Rows.Count > 0)
                {
                    lblSubjectValue.Text = obj.DtResult.Rows[0]["ExamMins"].ToString() + " minutes";
                }
                lblExamIDValue.Text = appointmentToEdit.ID.ToString();
                //txtDescription.Text = appointmentToEdit.Description;
                StartTime.SelectedDate = ExamScheduler.UtcToDisplay(appointmentToEdit.Start);
            }
        }
Beispiel #2
0
        private Appointment GetAppointmentFromForm(Appointment apt)
        {
            if (apt == null)
            {
                apt = new Appointment();
            }
            DateTime start = ExamScheduler.DisplayToUtc(StartTime.SelectedDate.Value);

            //DateTime end = start.AddMinutes(90);
            // apt.Subject = lblSubjectValue.Text;
            //apt.Description = txtDescription.Text;
            apt.Start = start;
            // apt.End = end;
            return(apt);
        }
Beispiel #3
0
        protected void Bind_GetBookedExamSlots()
        {
            BECommon objBECommon = new BECommon {
                IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID])
            };

            new BCommon().BBind_GetBookedExamSlots(objBECommon);

            if (objBECommon.DtResult != null)
            {
                ExamScheduler.DataSource = objBECommon.DtResult;
                ExamScheduler.DataBind();
                //ExamScheduler.SelectedDate = System.DateTime.Today;
            }
        }
Beispiel #4
0
        protected void ExamScheduler_FormCreating(object sender, SchedulerFormCreatingEventArgs e)
        {
            lblMsg.Text = string.Empty;
            if (e.Mode == SchedulerFormMode.Insert || e.Mode == SchedulerFormMode.Edit || e.Mode == SchedulerFormMode.AdvancedEdit || e.Mode == SchedulerFormMode.AdvancedInsert)
            {
                EditedAppointment = e.Appointment;
                e.Cancel          = true;
            }
            if (e.Mode == SchedulerFormMode.Insert || e.Mode == SchedulerFormMode.AdvancedInsert)
            {
                drpCourse.SelectedValue = "-1";
                drpExam.SelectedValue   = "-1";
                lblSubjectValue.Text    = "";
                // txtDescription.Text = string.Empty;
                lblExam.Visible             = false;
                lblCourse.Visible           = false;
                drpCourse.Visible           = true;
                drpExam.Visible             = true;
                PanelDockConfirm.Visible    = false;
                PanelDock.Visible           = true;
                btnSchedule_Reschedule.Text = "Confirm";
                RadDock1.Title = "Schedule Exam";
            }
            if (e.Mode == SchedulerFormMode.Edit || e.Mode == SchedulerFormMode.AdvancedEdit)
            {
                drpCourse.Visible           = false;
                drpExam.Visible             = false;
                lblExam.Visible             = true;
                lblCourse.Visible           = true;
                PanelDockConfirm.Visible    = false;
                PanelDock.Visible           = true;
                btnSchedule_Reschedule.Text = "Confirm";
                RadDock1.Title = "Reschedule Exam";
            }

            var appointmentToEdit = ExamScheduler.PrepareToEdit(e.Appointment, ExamScheduler.EditingRecurringSeries);

            ScriptManager.RegisterStartupScript(Page, GetType(), "formScript", "Sys.Application.add_load(openForm);", true);
            GetEditForm(appointmentToEdit);
        }